FIND YOUR NEXT FEW LINES

The snippet library.

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

10 snippets foundClear filters
HTMLText semantics

Attach a pronunciation annotation to text

HTML: Ruby and rt represent a base text and its short annotation.

HTML✓ Tested
HTMLText semantics

Expand an abbreviation with explanatory text

HTML: The title attribute supplies the full form while nearby text remains useful without hovering.

HTML✓ Tested
HTMLText semantics

Highlight a relevant phrase in context

HTML: Mark identifies text relevant to the current activity, such as a search match.

HTML✓ Tested
HTMLText semantics

Identify the title of a cited work

HTML: Cite marks the title of a work rather than the name of its author.

HTML✓ Tested
HTMLText semantics

Isolate a value with a different writing direction

HTML: Bdi isolates embedded user text so its direction does not reorder surrounding punctuation.

HTML✓ Tested
HTMLText semantics

Mark a longer quotation and its source

HTML: Blockquote marks quoted content; a visible source link remains useful because cite is metadata.

HTML✓ Tested
HTMLText semantics

Mark a short quotation within a sentence

HTML: The q element identifies an inline quotation and allows native quotation marks.

HTML✓ Tested
HTMLText semantics

Offer an optional break inside a long label

HTML: Wbr supplies a potential line-break opportunity without inserting a visible hyphen.

HTML✓ Tested
HTMLText semantics

Represent removed and inserted text

HTML: Del and ins record a textual change while retaining both versions in the document.

HTML✓ Tested
HTMLText semantics

Write subscripts and superscripts in ordinary text

HTML: Sub and sup position short annotations such as formula indices and exponents.

HTML✓ Tested