The align attribute of the DIV element specifies the horizontal text alignment in a section.
<div align="center">centering text</div>
| Attribute | Value | Explanation |
|---|---|---|
| align=" " | left | aligns to the left |
| center | aligns to the center | |
| right | aligns to the right |
The use of this attribute is deprecated. (Use CSS instead)
Use CSS instead of deprecated HTML. Please see the "Related Document" for details on CSS.
<div align="left">Aligns to the left</div> <div align="center">Aligns to the center</div> <div align="right">Aligns to the right</div>