<div align="">
Browser |
|
---|---|
Type |
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)
Example
<div align="left">Aligns to the left</div>
<div align="center">Aligns to the center</div>
<div align="right">Aligns to the right</div>
- Output
-
Aligns to the leftAligns to the centerAligns to the right