Results for “if”
Small, practical examples. Search by task or narrow things down below.
Keep unmatched rows with LEFT JOIN
Show every product even when stock is missing.
LEFT JOIN✓ Tested
Label rows with CASE
Derive a readable label from a condition.
CASE✓ Tested
Lay out a short label in a vertical writing mode
CSS: Writing-mode changes the direction in which lines and inline content are laid out.
CSS✓ Tested
Leave room above a scrolled-to heading
CSS: Scroll-margin offsets scrollIntoView placement so a heading is not flush against the viewport edge.
CSS✓ Tested
Let a user choose a yes or no value
HTML: Learn how to let a user choose a yes or no value in a complete browser example.
HTML✓ Tested
Limit a content column’s width
CSS: Learn how to limit a content column’s width in a complete browser example.
CSS✓ Tested
Limit a numeric input to an inclusive range
HTML: Number inputs expose range validation separately from the entered text.
HTML✓ Tested
Limit a value to a safe interval
Clamp an integer between chosen endpoints.
constrain✓ Tested
Limit typed text to a maximum length
HTML: Maxlength limits ordinary user editing without replacing server-side validation.
HTML✓ Tested
Link a document’s alternate language version
HTML: Use hreflang on an alternate link to declare the language of another page.
HTML✓ Tested
Link to a section on the same page
HTML: Learn how to link to a section on the same page in a complete browser example.
HTML✓ Tested
List distinct values
Remove duplicate category values from a result.
DISTINCT✓ Tested