HTML 4.01 <hr> tag stands for Horizontal Ruler, it is used to create a horizontal line on the HTML document. By default, <hr> tag will appear with a width of 100%, height of 2px, and with 3D border.
<hr> tag is an empty tag, you do not need to close hr tag
Attribute | Description |
---|---|
Width* | Specifies the width of a horizontal line. |
Align* | Use to change the line alignment. Values are left, center, right. Default is center. |
Size* | Use to change the height of a line. |
Color* | Use to change the color of a line. |
Example 1: Horizontal Line using hr tag with styling.