HTML hr Tag

HTML <hr> Tag: The HTML <hr> tag helps in separating the content. And the HTML hr tag in HTML stands for horizontal rule and is used to insert a horizontal rule or a thematic break in an HTML page to divide or separate document sections. This HTML hr tag supports both the global and the event attributes.

 HTML<hr>Tag

The <hr> tag is an empty tag and it does not require an end tag. In HTML5 <hr>tag defined as a thematic break.
Layout attributes are removed.

Syntax: <hr>

Browser compatibility

The HTML<hr>tag is supported by different types of attributes.

  • Chrome
  • Firefox
  • Opera
  • Safari
  • Internet Explorer

Example:

<!DOCTYPE html>
<html>
<body>
<h1>FRESHERSNOW TUTORIALS</h1>
<hr>
<h1>FRESHERSNOW JOBS</h1>
</body>
</html>

Output:

HTML hr tag

Attributes that are supported by the <hr> tag

Attribute Value Description
align left
center
right
Specifies the alignment of an element
noshade no shade Specifies that the element should render in one solid color instead of a shaded color
size pixels Specifies the height of an element
width pixels
%
Specifies the width of an element