Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML hr align Attribute

HTML
The align attribute

HTML hr Tag Reference HTML


tag

Example

A left-aligned horizontal rule:

This is some text. This is some text. This is some text.


Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the align attribute.


Definition and Usage

HTML5 does not support


the align attribute. Please use CSS instead.

In HTML 4.01,


The align attribute is deprecated.

The align attribute specifies the alignment of the horizontal rule.

**Note:** The align attribute has no effect unless the width attribute is set to less than 100%.


Compatibility notes

In HTML 4.01,


The align attribute is deprecated. Please use CSS instead.

CSS syntax (IE and Opera):


CSS syntax (Firefox, Chrome, and Safari):


CSS syntax (cross-browser):


CSS example: alignment


Element

In our CSS tutorial, you can find more details about The text-align propertydetails.


Syntax


Attribute values

Value Description
left Left-aligned horizontal rule.
center Center-aligned horizontal rule (default).
right Right-aligned horizontal rule.

HTML hr Tag Reference HTML


tag