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
borderproperty can be used to visually style a break in the document.
In this example, an
hr is used to separate body content from footer
<p>And with that the actress and the bishop made their eventful departure.</p> <hr/> <div id="footer">© All content copyright 2007. Even the unfunny stuff.</div>
Use This For …
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.
Every browser listed supports this element type.
However, the way that the
element renders differs greatly between browsers, so it doesn’t pay to be
too precious about design consistency in this