Skip to content
Related Articles

Related Articles

HTML | <hr> align Attribute

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 17 Dec, 2021

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.

<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.


<!DOCTYPE html>
        HTML hr align Attribute
        hr align="left"
    <hr width="300px;"
    <h4 class="gfg">
        hr align="right"
    <hr width="50%" align="right"
        <h4 class="gfg2">
           hr align="center"       
    <hr width="50%"


Supported Browsers: The browser supported by HTML <hr> align Attribute are listed below: 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera 

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!