Description

The <hr> (short for horizontal rule) tag is used to insert a horizontal rule or line to separate document sections, visually.

The following table summarizes the usages context and the version history of this tag.

Placement:Block
Content:None. It is an empty element.
Start/ End Tag:Start tag: required, End tag: forbidden
Version:HTML 2, 3.2, 4, 4.01, 5

Syntax

The basic syntax of the <hr> tag is given with:

HTML: <hr>; XHTML: </hr>

The example below shows the <div> tag in action.

<p>This is the first paragraph of text.</p>
<hr>
<p>This is second paragraph of text.</p>                       

Do not use these attributes! As it has been deprecated in HTML 4.01 and obsolete since HTML5. Use CSS instead.

Tag-Specific Attributes

The <hr> tag doesn't have any specific attribute.

Global Attributes

Like all other HTML tags, the <hr> tag supports the global attributes in HTML5.

Event Attributes

The <hr> tag also supports the event attributes in HTML5.

Browser Compatibility

Element
<hr>YesYesYesYesYes