content logo

Learn HTML:

Html hr tag

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


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

This will produce following result:

This text will be followed by a horizontal line

Specific Attributes

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


Attribute Value Description
align left
Deprecated-Specifies the alignment of the horizontal rule.
noshade noshade Deprecated-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.

HTML Hr Example


HTML Hr Code


HTML Hr Tutorial