HTML
The align attribute
tag
Example
A section of the document centered:
This is some text!
Try it »
Browser support





All major browsers support the align attribute.
Definition and Usage
No longer supported in HTML5
the align attribute; please use CSS instead.
The align attribute is deprecated in HTML 4.01.
The align attribute specifies
the horizontal alignment of the content in the element.
Compatibility notes
No longer supported in HTML5
the align attribute; please use CSS instead.
CSS syntax:
CSS example: reducing the line height in a list
In our CSS tutorial, you can find more details about The text-align propertydetails.
Syntax
Attribute values
| Value | Description |
|---|---|
| left | Align content to the left. |
| right | Align the content to the right. |
| center | Center-align content. |
| justify | Stretch the lines so that each line has an equal length (as in newspapers and magazines). |
HTML
tag