<p align="">
Browser |
|
---|---|
Type |
The align attribute of the P element specifies the horizontal text alignment in a paragraph.
<p align="center">centering text</p>
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
<p align="left">Aligns to the left</p>
<p align="center">Aligns to the center</p>
<p align="right">Aligns to the right</p>
- Output
-
Aligns to the left
Aligns to the center
Aligns to the right