0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Content in an aside should be related to the surrounding content but not essential to understanding it. The page should make sense if the aside is removed.
For alert-style notifications (warnings, tips, success messages, errors), use <status-message> instead.
Examples
Default
Basic aside without additional styling.
Default aside
<aside><h2>Did you know?</h2><p>The aside element was introduced in HTML5 to provide semantic meaning for content that is tangentially related to the main content.</p></aside>
Subtle note style for minor supplementary information.
Note aside
<asideclass="note"><strong>Note:</strong> This feature is available in version 2.0 and later.</aside>
.float
Floating aside for pull quotes that flow with text. It floats to the inline end at 40% of the container's inline size. Below 40rem it un-floats and spans the full width, so the quote never gets too narrow to read.
Float aside
<article><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit...</p><asideclass="float"><p><em>"Design is not just what it looks like and feels like. Design is how it works."</em></p><p>— Steve Jobs</p></aside><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris...</p></article>
Content after a floated aside wraps around it. If a following block (a heading, a figure, a new section) must start below the quote, give it clear: both.
.sidenote
Margin annotation that floats alongside text on wide viewports. On narrow viewports, collapses to a bordered inline block. Requires the parent container to have margin space (e.g., inside <layout-text>).
Place the aside before the paragraph it annotates. A float starts at its own position in the flow, so putting it first lines the note up with the top of that paragraph.
Sidenote aside
<layout-text><asideclass="sidenote"> 1831–1836. The ship was a Cherokee-class 10-gun brig-sloop commanded by Captain Robert FitzRoy.</aside><p>Darwin's voyage on the Beagle lasted nearly five years...</p></layout-text>
Variants
Class
Description
.sidebar
Raised background panel style for sidebar content
.note
Subtle, compact note with muted text for de-emphasized content
.float
Pull quote: float: inline-end with inline-size: 40%; un-floats to full width below 40rem
.sidenote
Margin annotation (22ch) that floats alongside text; collapses to bordered block on narrow viewports
Accessibility
An aside is a complementary landmark only when it is scoped to <body> or <main>, or when it has an accessible name. Inside <article>, <section>, <nav> or another <aside>, an unnamed aside is exposed as a generic element and does not appear in landmark navigation.
When you want the aside to be a landmark (for example a page sidebar), name it with aria-labelledby pointing at its heading, or with aria-label. Give each landmark aside a distinct name.
Small inline asides such as pull quotes, notes and sidenotes need not be landmarks: inside an <article> or <section> they can stay unnamed. At <body> or <main> level they are landmarks, so give each one a meaningful, distinct name (for example aria-label="Sidenote: HMS Beagle") rather than a generic one.
Include a heading to label longer asides
Keep aside content concise and focused on a single topic
Related
<article> - Aside often appears within or alongside articles
<section> - For thematic grouping (aside is for tangential content)