VOOZH about

URL: https://www.geeksforgeeks.org/html/html-hr-align-attribute/

⇱ HTML <hr> align Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <hr> align Attribute

Last Updated : 11 Jul, 2025

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.

Note: The <hr> align Attribute is not supported by HTML5.

Syntax:

<hr align="left | center | right">

Attribute Values:

Attribute Values

Description

left

It sets the left alignment to the horizontal line.

center

It sets the center-align to the horizontal line. It is the default value.

right

It sets the right alignment to the horizontal line.

Example: In this example, we will see the implementation of hr align attribute tag with an example.

Output:

👁 Image

Supported Browsers:

  • Google Chrome 1
  • Edge 12
  • Firefox 1
  • Safari 12.1
  • Opera 3
Comment
Article Tags: