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…
The horizontal rule element represents a thematic break between paragraph-level content, signaling a shift in topic or scene.
Overview
The <hr> element creates a thematic break in HTML content. Despite its name, it represents a semantic break rather than just a visual line. Use it to separate sections of content that have different topics or themes.
Basic horizontal rule
<p>The story begins...</p><hr /><p>Three days later...</p>
When to Use
Scene changes - In stories or narratives when the setting or time changes
Topic shifts - When transitioning to a different subject within the same document
Section breaks - To separate major content areas without using a new heading
Before footnotes - To separate main content from endnotes or footnotes
When Not to Use
Visual spacing - Use CSS margins or padding instead
Decorative lines - Use CSS borders on containers instead
Between every section - Headings already provide visual separation
Before/after headers or footers - Use semantic elements instead
Default Style
The default horizontal rule displays as a thin border line with vertical margin.
Decorative Variant
The .decorative class creates a centered dot pattern instead of a line, useful for creative writing or less formal contexts.
Decorative horizontal rule
<p>The end of the scene.</p><hrclass="decorative" /><p>A new setting emerges.</p>
Use Cases for Decorative
Scene breaks in fiction
Time jumps in narratives
Thought transitions in essays
Section breaks in newsletters
Custom Ornament
The data-ornamentattribute lets you specify any text or symbol as the divider content. This is more flexible than the .decorative class, which always uses dots.
A bare data-ornament (no value) shows the --hr-ornament custom property, which defaults to ⁂ (asterism). Set it on :root or a section to choose the default glyph.
Themes restyle only plain <hr> rules: an hr with data-ornament or any class (.decorative, the shape variants, or your own) is left alone, so your chosen symbol always renders as specified. The one exception is a value a pack defines: the journal pack turns data-ornament="doodle" into a hand-drawn squiggle. That value only means something with the journal theme active; under any other theme it prints the word "doodle", so use it only on journal pages.
The ornament is visual only. It is rendered with empty alternative text (content: attr(data-ornament) / ""), so screen readers announce a separator, not "section sign" or "asterism". The same applies to the .decorative dots.
Five classes turn the rule into a shaped divider: .wave, .zigzag, .scallop, .diamonds and .dots. The first four use CSS shape() and fall back to the plain line where it isn't supported. .dots uses a radial gradient and works everywhere. For shaped section edges see data-shape-start / data-shape-end.
Themes recolour shape dividers but keep the shape.
Forced Colors and Print
Forced colors (Windows High Contrast): the browser repaints backgrounds with the system Canvas colour. That would hide the shape dividers and the many theme rules that draw an hr with a gradient or background. So in forced colors mode every plain and shape hr becomes a 1px CanvasText line, whatever the theme. Ornament and .decorative rules keep their glyphs, which are drawn in the system text colour.
Print: browsers drop backgrounds when printing by default. The plain rule is a border, so it always prints. The shape dividers set print-color-adjust: exact so they print as shown.
Examples in Context
Blog Post with Thematic Break
Blog post thematic break
<h2>My Trip to Japan</h2><p>We started in Tokyo...</p><hr /><p>A week later, we found ourselves in Kyoto...</p>
Article with Footnotes
Footnote separator
<p>The findings suggest a correlation<sup>1</sup>.</p><hr /><p><small><sup>1</sup> Smith et al., 2023.</small></p>
Scene Break in Fiction
Scene break with decorative rule
<p>She closed the door, knowing she would never return.</p><hrclass="decorative" /><p>Twenty years later, she stood at that same door.</p>
The <hr> element has an implicit ARIA role of separator. Screen readers may announce it as a separator or horizontal rule, helping users understand the content structure.
Best Practices
Use for thematic breaks only - Don't use hr for purely visual decoration
Consider context - Ensure the break makes sense without visual styling
Don't overuse - Too many breaks can be disorienting for screen reader users
Combine with headings - For major sections, a heading may be more appropriate
ARIA Considerations
If using hr purely for decoration, you can hide it from screen readers:
Hidden from screen readers
<hraria-hidden="true" />
However, this is generally not recommended. If the break is meaningful, it should be announced. If it's purely decorative, consider using CSS borders instead.
Alternatives to hr
Consider these alternatives depending on your use case:
<section><h2>First Topic</h2><p>Content about the first topic.</p></section><section><h2>Second Topic</h2><p>Content about the second topic.</p></section>