FIND YOUR NEXT FEW LINES

The snippet library.

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

10 snippets foundClear filters
CSSType & reading flow

Add spacing between characters

CSS: Letter-spacing adds a consistent amount between typographic characters.

CSS✓ Tested
CSSType & reading flow

Align inline text to the container’s end edge

CSS: Text-align end follows the writing direction rather than always choosing the right edge.

CSS✓ Tested
CSSType & reading flow

Control tab width in preformatted content

CSS: Tab-size defines the interval of tab stops in a preformatted block.

CSS✓ Tested
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
CSSType & reading flow

Increase spacing between words

CSS: Word-spacing adds to the font’s normal space width.

CSS✓ Tested
CSSType & reading flow

Lay out a short label in a vertical writing mode

CSS: Writing-mode changes the direction in which lines and inline content are laid out.

CSS✓ Tested
CSSType & reading flow

Preserve line breaks while collapsing repeated spaces

CSS: Pre-line retains newlines but does not preserve all whitespace like pre-wrap does.

CSS✓ Tested
CSSType & reading flow

Separate an underline from the text

CSS: Text-underline-offset improves the gap between letters and a decorative underline.

CSS✓ Tested
CSSType & reading flow

Set an explicit font weight

CSS: Numeric font weights express typographic emphasis independently of a specific font family.

CSS✓ Tested
CSSType & reading flow

Style supporting text in italics

CSS: Font-style changes presentation without adding semantic emphasis by itself.

CSS✓ Tested