FIND YOUR NEXT FEW LINES

Results for “Refs & DOM interaction”

Small, practical examples. Search by task or narrow things down below.

169 snippets foundClear filters
CSSType & reading flow

Display a label in uppercase without changing its text

CSS: Text-transform changes visual casing while preserving the DOM’s source text.

CSS✓ Tested
HTMLData & disclosure

Display code as text

Escape angle brackets in preformatted HTML code samples.

HTML✓ Tested
HTMLForms

Group mutually exclusive choices

Use the same name for HTML radio buttons and a fieldset legend.

HTML✓ Tested
jQueryDOM & classes

Hide and show content

Use a button to toggle jQuery visibility and an accessibility state.

jQuery✓ Tested
CSSInteraction & themes

Include padding in element width

Use border-box to keep CSS padding and borders inside the declared width.

CSS✓ Tested
HTMLData & disclosure

Label a data table

Use a caption and scoped headers for an HTML data table.

HTML✓ Tested
HTMLLinks & accessibility

Link to a page section

Use a fragment link to target an HTML section on the same page.

HTML✓ Tested
HTMLLinks & accessibility

Mark up a machine-readable date

Pair a readable date with an ISO datetime attribute in HTML.

HTML✓ Tested
HTMLLinks & accessibility

Name an icon button

Give a button containing only a symbol an accessible name.

HTML✓ Tested
HTMLForms

Offer a selection list

Provide a labeled HTML select with a default option.

HTML✓ Tested
HTMLLinks & accessibility

Open a link in a separate tab

Declare a separate browsing context with an explicit noopener relationship.

HTML✓ Tested
HTMLDocument structure

Pair terms and descriptions

Use a description list for a small HTML glossary.

HTML✓ Tested