HTML Tag Reference - HTML tag <hr>








This <hr> element creates a horizontal rule going across the page. The default setting causes the line to be shaded, giving it a 3D appearance.

Browser compatibility

<hr> Yes Yes Yes Yes Yes

What's new in HTML5

None.

Attribute

align
Value:left|center|right
Not supported in HTML5. the alignment
noshade
Value:noshade
Not supported in HTML5. Turn off the shade
size
Not supported in HTML5. the height in pixels
width
Value:pixels|%
Not supported in HTML5. Set the width

Global Attributes

The <hr> tag supports the Global Attributes in HTML.





Event Attributes

The <hr> tag supports the Event Attributes in HTML.

Default CSS Settings

hr { 
    display: block;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: auto;
    margin-right: auto;
    border-style: inset;
    border-width: 1px;
}




Example

A demo showing how to use <hr> tag.

<html>
<body>
     paragraph#1
     <hr>
     paragraph#2
     <hr>
</body>
</html>

Click to view the demo