Results for “if”
Small, practical examples. Search by task or narrow things down below.
Validate the shape of an absolute URL
HTML: A URL input checks syntax, not whether a resource exists or is safe.
HTML✓ Tested
Visually distinguish a disabled control
CSS: The disabled pseudo-class follows the control’s actual disabled state.
CSS✓ Tested
Write a JSON file
Save a dictionary as readable, indented JSON while preserving Unicode characters.
json✓ Tested
Write a text file
Save a string to a UTF-8 text file and close the file automatically when the write finishes.
file✓ Tested
Write an ordered set of steps
HTML: Learn how to write an ordered set of steps in a complete browser example.
HTML✓ Tested
Write an unordered list
HTML: Learn how to write an unordered list in a complete browser example.
HTML✓ Tested
Write and read a setting in EEPROM
Persist one byte using the update operation.
EEPROM✓ Tested
Write dictionaries to CSV
Write a list of dictionaries to a CSV file with a header row and a predictable column order.
csv✓ Tested
Write subscripts and superscripts in ordinary text
HTML: Sub and sup position short annotations such as formula indices and exponents.
HTML✓ Tested
Write your first CSS rule
CSS: Learn how to write your first CSS rule in a complete browser example.
CSS✓ Tested