HTML
The align attribute
tag
Example
A left-aligned horizontal rule:
This is some text. This is some text. This is some text.
Try it »
Browser support





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):
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
tag