The <hr> element marks a thematic break between content — a change of scene, topic, or section within a page. Visual browsers usually show it as a horizontal line, but the meaning is semantic, not decorative.
Prefer <hr> when the break itself matters in the content. If you only need a drawn line with no topic change, add a CSS border to another element instead. Do not confuse it with <br> (a line break inside text).
Baseline · Widely available.
Not deprecated. Stable across browsers since about July 2015 (and much earlier in practice).
Deprecated attributes.
Do not use align, color, noshade, size, or width on <hr>. Style the rule with CSS borders instead.
Syntax
HTML Syntax
syntax.html
<hr>
Void element: start tag only, no content, no end tag. Implicit ARIA role is separator.
Reference
Attributes
Modern <hr> has no element-specific attributes — only global attributes. Older presentational attributes below are obsolete.
Insert <hr> between option groups (allowed as a child of select).
Open the control to see the visual gap between groups.
Support varies slightly by browser, but the markup is valid HTML.
Edge Cases & Pitfalls
Most hr mistakes mix decoration with meaning, or revive obsolete attributes.
meaning
Not every line is an hr
If you only want a visual divider with no topic change, use a CSS border on another element instead of <hr>.
obsolete
Skip presentational attributes
align, color, noshade, size, and width are deprecated. Use CSS borders and width.
vs br
hr ≠ br
<br> breaks a line inside text. <hr> separates blocks with a thematic break.
void
No content or end tag
Do not write <hr>...</hr> or put text inside. Use <hr> alone.
a11y
Role is separator
Assistive tech may announce a separator. Prefer real topic changes so that announcement stays useful.
Compatibility
Browser Support
The <hr> element is core HTML flow content in every browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
<hr>
Widely available since about July 2015 (and long before). Chrome, Firefox, Safari, Edge, and Opera all support thematic breaks with default horizontal-rule styling.
98%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet ExplorerAll
Supported
hrWidely supported
Bottom line: Safe to use everywhere. Style with CSS; reserve hr for real thematic breaks.
Remember
Key Takeaways
Meaning:hr marks a thematic break, not just a pretty line.
Style: use CSS borders; never obsolete align/color/size/width.
Override with border, width, and margin as needed. Keep the HTML semantic.
Frequently Asked Questions
The hr element marks a thematic break — a shift of topic or scene. Browsers usually draw it as a horizontal line, but the meaning is semantic, not decorative.
Yes. Write <hr> or <hr />. There is no end tag and no content inside.
No. Those presentational attributes are obsolete. Style the rule with CSS border properties instead.
If you only want a visual line with no topic change, put a border on another element. Use hr when the break itself is meaningful in the content.
br inserts a line break inside text. hr separates blocks of content with a thematic break. They solve different problems.
The implicit ARIA role is separator. Assistive tech can announce a separation between regions of content.