hr

< html‎ | elements
Jump to: navigation, search

hr

This article is In Progress.


W3C Recommendation

Summary

The hr element represents a paragraph-level thematic break in text.


Overview Table

DOM Interface HTMLHRElement

The hr element represents a paragraph-level thematic break. That sounds kinda strange, I know, but a good example what that means comes from the world of fiction where the text in a given chapter might shift from one location to another or from one period of time to another. The hr is a great way to indicate a shift like that.

Examples

This example uses the hr element to create a paragraph-level thematic break.

HTML

<p>This is a paragraph in a section about Topic A.</p>
<hr/>
<p>This paragraph is part of a section concerning Topic B.</p>

Usage

The hr element is a “replaced element” which means it is comprised of a single tag with no content. You can apply attributes (e.g. class) to the tag, but it must not contain text.

As a replaced element, the hr will be automatically closed by browsers, but you can also explicitly close the element with a trailing slash: <hr/>

Notes

In HTML 4.01, the hr element represented a horizontal rule. And while the hr element may still be displayed as a horizontal rule in visual browsers, it is now defined in semantic terms, rather than presentational ones.

Standards information

Related specifications

Specification Status Related Changes
HTML5 W3C Working Draft Semantic meaning to “paragraph-level thematic break”.
HTML 4.01 Specification W3C Recommendation

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic Support 0.2
0.8
1
1
1

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic Support Supported (when?)
Supported (when?)
Supported (when?)
Supported (when?)
Supported (when?)
Supported (when?)
Supported (when?)
Supported (when?)

See also

Related articles

HTML















































  • html/elements/hr




… further results

Text













































  • html/elements/hr






… further results

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]