The snippet library.
Small, practical examples. Search by task or narrow things down below.
Give a date a machine-readable value
HTML: Learn how to give a date a machine-readable value in a complete browser example.
HTML✓ Tested
Give related form fields a shared title
HTML: Learn how to give related form fields a shared title in a complete browser example.
HTML✓ 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
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
Mark emphasis and importance
HTML: Learn how to mark emphasis and importance in a complete browser example.
HTML✓ Tested
Provide a list of selectable options
HTML: Learn how to provide a list of selectable options in a complete browser example.
HTML✓ Tested
Require a form field
HTML: Learn how to require a form field in a complete browser example.
HTML✓ Tested
Separate prose into paragraphs
HTML: Learn how to separate prose into paragraphs in a complete browser example.
HTML✓ Tested
Show progress with a native element
HTML: Learn how to show progress with a native element in a complete browser example.
HTML✓ Tested
Use headings to show document structure
HTML: Learn how to use headings to show document structure in a complete browser example.
HTML✓ Tested
Use semantic page landmarks
HTML: Learn how to use semantic page landmarks in a complete browser example.
HTML✓ Tested
Write an ordered set of steps
HTML: Learn how to write an ordered set of steps in a complete browser example.
HTML✓ Tested