HTML p align property
Browser Support
All major browsers support align attribute.
Definition and Usage
HTML5 does not support <p> align attribute. Use CSS instead.
In HTML 4.01, <p> The align attribute is deprecated .
Chinese align attribute specifies the alignment of text paragraphs.
Compatibility Notes
In HTML 4.01, <p> The align attribute is deprecated, use CSS instead.
CSS Syntax: <p style = "text-align: right">
CSS Example: align text within a paragraph
In our CSS tutorial you can find more information about the text-align attribute details.
grammar
<p align="left|right|center|justify">
Property Value
值 | 描述 |
---|---|
left | 左对齐文本。 |
right | 右对齐文本。 |
center | 居中对齐文本。 |
justify | 对行进行伸展,这样每行都可以有相等的宽度(就像在报纸和杂志中)。 |
HTML <p> tag