- Element of
- Fonts and Web Typography
- What does
Code Example For HTML Hr Tags (And Which Browsers Support Them)do?
- The <hr> element is used to represent a thematic break between paragraph-level elements. It is typically rendered as a horizontal line.
<p>This is above line.</p> <hr> <p>This is below the line.</p>
This is above line.
This is below the line.
A separator, not a border
It is very easy to misuse the
<hr> element. If you find yourself including in a page template, you should probably rethink things. Structural sections of your page design should be defined with the appropriate semantic document tags, and any lines you might desire should be defined with CSS. The
<hr> element, which creates a small separator bar is best thought of as a typographical element, as something that might come within the context of your content — not a part of the design. This can be useful for when you want to divide a piece of content into sections without using headlines elements.
Browser Support for hr