Skip to content
Tutorials Center
My learning

Topics

HTML Reference Β· Text Content

The <hr> element

Reference for the HTML <hr> element: a thematic break between paragraphs, styling the line with CSS, use inside <select>, accessibility and technical details.

The <hr> element marks a thematic break: a shift between paragraph-level blocks, such as a change of scene in a story or a move to a different topic inside a section. Browsers draw it as a horizontal line, but the line is only the default look; the meaning is "a new part starts here".

<hr> is a void element: it has no content and no end tag.

HTML
<p>…and the train finally left the station.</p>
<hr>
<p>Three years later, the station was a museum.</p>

Try it

Thematic breaks with custom styling

Attributes

This element has no attributes of its own. It accepts the global attributes. Old presentational attributes such as size, width, color, align and noshade are obsolete; use CSS instead.

Usage notes

  • Meaning, not decoration. Use <hr> for a real change of topic or scene. For a purely decorative line, use a CSS border on an existing element.
  • Not between sections. Separate <section> or <article> elements already mark their own boundaries, so you don't need an <hr> between them.
  • Style it freely. The default look comes from borders. Reset with border: none and draw your own with border-top, a background, or a ::after ornament.
  • Inside <select>. Current HTML also allows <hr> inside a <select> to draw a visual separator between options. Older browsers simply ignore it there.
  • Accessibility. <hr> has the separator role, and some screen readers announce it, which helps listeners notice the shift.

Technical summary

Content categories Flow content
Permitted content None; it is a void element
Tag omission Must have a start tag and must not have an end tag
Permitted parents Any element that accepts flow content; also <select>
Implicit ARIA role separator
DOM interface HTMLHRElement
Default display block

Browser support

Supported in every browser. Separators inside <select> render only in recent browser versions.