HTML <hr> Tag

Advertisements


Description

The HTML <hr> tag is used for creating a horizontal line. This is also called Horizontal Rule in HTML.

Example

<!DOCTYPE html>
<html>
<head>
<title>HTML hr Tag</title>
</head>
<body>
<p>This text will be followed by a horizontal line <hr /></p>
</body>
</html>

This will produce following result:

This text will be followed by a horizontal line


Global Attributes

This tag supports all the global attributes described in - HTML Attribute Reference

Specific Attributes

The HTML <hr> tag also supports following additional attributes:

AttributeValueDescription
align left
right
center
Deprecated-Specifies the alignment of the horizontal rule.
noshade noshadeDeprecated-Removes the usual shading effect that most browsers display.
size pixels or %Deprecated-Specifies the height of the horizontal rule.
width pixels or %Deprecated-Specifies the width of the horizontal rule.

Event Attributes

This tag supports all the event attributes described in - HTML Events Reference

Browser Support

ChromeFirefoxIEOperaSafariAndroid
YesYesYesYesYesYes

html_tags_reference.htm