Results for “Refs & DOM interaction”
Small, practical examples. Search by task or narrow things down below.
Name complementary content
HTML: Aside identifies supporting content related to the main document.
HTML✓ Tested
Offer a downloadable text file
HTML: The download attribute supplies a filename for this same-document data URL.
HTML✓ Tested
Offer an optional break inside a long label
HTML: Wbr supplies a potential line-break opportunity without inserting a visible hyphen.
HTML✓ Tested
Open and close a modal dialog
HTML: showModal places a dialog in the top layer and makes the rest of the document inert.
HTML✓ Tested
Provide a concise page description
HTML: A description meta element summarizes a document for clients that use that metadata.
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
Remove an inactive section from keyboard navigation
HTML: Inert prevents interaction and accessibility exposure for an inactive subtree.
HTML✓ Tested
Represent a hierarchy with nested lists
HTML: Place the nested list inside its parent list item to preserve the hierarchy.
HTML✓ Tested
Represent progress whose total is unknown
HTML: Omit value to make a progress element indeterminate.
HTML✓ Tested
Represent removed and inserted text
HTML: Del and ins record a textual change while retaining both versions in the document.
HTML✓ Tested
Require a checkbox to be selected
HTML: A required checkbox is invalid until that individual control is checked.
HTML✓ Tested
Require a form field
HTML: Learn how to require a form field in a complete browser example.
HTML✓ Tested