FIND YOUR NEXT FEW LINES

Results for “HTML”

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

503 snippets foundClear filters
CSSResponsive conditions & sizing

Adapt a layout to viewport orientation

CSS: The orientation query compares viewport dimensions rather than detecting a physical device type.

CSS✓ Tested
CSSResponsive conditions & sizing

Add a clear boundary in forced-colors mode

CSS: Use a system color for a border when the user’s forced-color mode is active.

CSS✓ Tested
jQueryGetting Started

Add a CSS class

jQuery: Learn how to add a CSS class in a complete browser example.

jQuery✓ Tested
CSSVisual treatment & accessibility

Add depth with a box shadow

CSS: Box shadows are painted outside the box without reserving additional layout space.

CSS✓ Tested
CSSBox dimensions & overflow

Add inner spacing to a content-sized box

CSS: In content-box sizing, padding adds to the declared content width.

CSS✓ Tested
CSSGetting Started

Add space inside a border

CSS: Learn how to add space inside a border in a complete browser example.

CSS✓ Tested
CSSGetting Started

Add space outside an element

CSS: Learn how to add space outside an element in a complete browser example.

CSS✓ Tested
CSSType & reading flow

Add spacing between characters

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

CSS✓ Tested
CSSGrid placement

Align a nested grid with its parent’s columns

CSS: Subgrid reuses the parent tracks for the nested grid’s covered span.

CSS✓ Tested
CSSVisual treatment & accessibility

Align an image within its content box

CSS: Object-position places the rendered object when fitting leaves spare space or crops an edge.

CSS✓ Tested
CSSFlexbox alignment

Align flex items at the main-axis end

CSS: Flex-end uses the trailing edge of the flex container for packing.

CSS✓ Tested
CSSGetting Started

Align inline text in its container

CSS: Learn how to align inline text in its container in a complete browser example.

CSS✓ Tested