HTML | <hr> align Attribute
The HTML <hr> align Attribute is used to specify the alignment of the horizontal line. If the width attribute is not set to 100% then the align attribute will not create any effect.
Syntax:
<hr align="left | center | right">
Attribute Values:
- left: It sets the left-align to horizontal line.
- center: It sets the center-align to horizontal line. It is the default value.
- right: It sets the right-align to horizontal line.
Note: The <hr> align Attribute is not supported by HTML 5.
Example:
<!DOCTYPE html> <html> <head> <title> HTML hr align Attribute </title> </head> <body> <h1>GeeksforGeeks</h1> <hr width="300px;" size="10" align="left"> <p>Computer science portal</p> <hr width="50%" size="20"> <p>HTML hr align Attribute</p> <hr width="50%" size="30" align="right"> </body> </html> |
chevron_right
filter_none
Output:

Supported Browsers: The browser supported by HTML <hr> align Attribute are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Safari
- Opera
Recommended Posts:
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



