FIND YOUR NEXT FEW LINES

Results for “HTML”

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

503 snippets foundClear filters
CSSInteraction selectors

Style content associated with a checked option

CSS: The adjacent-sibling selector connects a checked control with its following label text.

CSS✓ Tested
CSSTypography

Style list markers

Set marker color separately from list text using CSS ::marker.

CSS✓ Tested
CSSInteraction selectors

Style placeholder text independently of entered text

CSS: The placeholder pseudo-element affects the hint, while the input rule styles the actual value.

CSS✓ Tested
CSSType & reading flow

Style supporting text in italics

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

CSS✓ Tested
AngularLists & control flow

Style the first and last list items

Style the first and last list items with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularSignals & state

Synchronize a document property with an effect

Synchronize a document property with an effect with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
CSSGetting Started

Target a unique element by ID

CSS: Learn how to target a unique element by ID in a complete browser example.

CSS✓ Tested
CSSGetting Started

Target an element by class

CSS: Learn how to target an element by class in a complete browser example.

CSS✓ Tested
AngularLifecycle & observable data

Tie a subscription’s lifetime to its component

Tie a subscription’s lifetime to its component with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Toggle a CSS class from component state

Toggle a CSS class from component state with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
jQueryGetting Started

Toggle a CSS class with a click

jQuery: Learn how to toggle a CSS class with a click in a complete browser example.

jQuery✓ Tested
jQueryDOM & classes

Toggle a state class

Toggle a CSS class in a jQuery click handler.

jQuery✓ Tested