hr (HTML element)

Depr. Empty Version
No Yes HTML 3.2
Browser support (more…)
IE5.5+ FF1+ SA1.3+ OP9.2+ CH2+
Full Full Full Full Full




The hr element creates in the document a highly visible break that renders as a slim horizontal line running the width of the area to which it’s applied. While it’s still perfectly valid to use this element in XHTML strict pages, as it’s not on the list of deprecated elements, it isn’t used a great deal these days, because:

  • It’s difficult to style consistently across browsers through CSS, or via its own presentational attributes.
  • In many cases, it may be better to use a combination of headings and lists to define the document structure, as this will promote ease of navigation for users of assistive technology; the CSS border property can be used to visually style a break in the document.


In this example, an hr is used to separate body content from footer information:

<p>And with that the actress and the bishop made their
    eventful departure.</p>
<div id="footer">&copy; All content copyright 2007. Even
    the unfunny stuff.</div>

Use This For …

The hr element can be used to create a break in a document at a point where there may be a change of thought or meaning, but where it may not necessarily be appropriate to introduce a subheading. A real-world equivalent for this element can be found in books where a divider may appear as three asterisks, or some other collection of characters to indicate a change of scene or momentum.


Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 3.0 3.5 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full

Every browser listed supports this element type.

However, the way that the hr element renders differs greatly between browsers, so it doesn’t pay to be too precious about design consistency in this case.

In this Section

User-contributed notes

Related Products