Skip to content
Related Articles

Related Articles

Improve Article

HTML | <hr> align Attribute

  • Last Updated : 05 May, 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


Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :