The HTML <hr> tag is the horizontal rule tag, used for creating a horizontal line. The HTML <hr> tag supports following additional attributes −
Attribute | Value | Description |
align | left right center | 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. |
Example
You can try to run the following code to add a horizontal rule in HTML −
<!DOCTYPE html> <html> <head> <title>HTML hr Tag</title> </head> <body> <p>This text will be followed by a horizontal line</p> <hr /> <p>Another horizontal line</p> <hr /> </body> </html>