Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
The horizontal rule element represents a thematic break between paragraph-level content, signaling a shift in topic or scene.
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.
Content in the first thematic section. This paragraph discusses one topic.
Content in the second thematic section. This paragraph shifts to a different topic.
<p>The story begins...</p><hr /><p>Three days later...</p>
The default horizontal rule displays as a thin border line with vertical margin.
The .decorative class creates a centered dot pattern instead of a line, useful for creative writing or less formal contexts.
<p>The end of the scene.</p><hr class="decorative" /><p>A new setting emerges.</p>
The data-ornament attribute lets you specify any text or symbol as the divider content. This is more flexible than the .decorative class, which always uses dots.
Unlike plain <hr> and .decorative rules, an explicit data-ornament value is preserved across all themes — your chosen symbol always renders as specified.
<hr data-ornament="❧" /> <hr data-ornament="~ ~ ~" /> <hr data-ornament="§" /> <hr data-ornament="✦ ✦ ✦" /> <hr data-ornament="⁂" />
| Character | Usage | Example |
|---|---|---|
| ❧ | Hedera (floral heart) | <hr data-ornament="❧" /> |
| § | Section sign | <hr data-ornament="§" /> |
| ✦ ✦ ✦ | Stars | <hr data-ornament="✦ ✦ ✦" /> |
| ~ ~ ~ | Tildes | <hr data-ornament="~ ~ ~" /> |
| ⁂ | Asterism | <hr data-ornament="⁂" /> |
<h2>My Trip to Japan</h2><p>We started in Tokyo...</p><hr /><p>A week later, we found ourselves in Kyoto...</p>
<p>The findings suggest a correlation<sup>1</sup>.</p><hr /><p><small><sup>1</sup> Smith et al., 2023.</small></p>
<p>She closed the door, knowing she would never return.</p><hr class="decorative" /><p>Twenty years later, she stood at that same door.</p>
hr { border: none; border-block-start: var(--border-width-thin) solid var(--color-border); margin-block: var(--size-xl);} /* Decorative variant */hr.decorative { border: none; text-align: center; &::before { content: "* * *"; color: var(--color-text-muted); letter-spacing: 0.5em; }} /* Custom ornament variant */hr[data-ornament] { border: none; text-align: center; &::before { content: attr(data-ornament); color: var(--color-text-muted); letter-spacing: 0.25em; }}
border-block-start for RTL supportmargin-block: var(--size-xl) for clear separation::before pseudo-element for dotsattr(data-ornament) for user-defined symbolsYou can customize the horizontal rule with CSS custom properties:
/* Thicker divider */hr.thick { border-block-start-width: var(--border-width-thick);} /* Colored divider */hr.accent { border-color: var(--color-interactive);} /* Tighter spacing */hr.compact { margin-block: var(--size-m);}
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.
If using hr purely for decoration, you can hide it from screen readers:
<hr aria-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.
Consider these alternatives depending on your use case:
Content with a bottom border for visual separation only.
More content below the border.
<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>
| Method | Use When | Semantic |
|---|---|---|
<hr> |
Thematic break without new heading | Yes |
| CSS border | Visual separation only | No |
<section> + heading |
Major new section with title | Yes |