English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The p align attribute specifies the alignment of the text in the paragraph.
Paragraph alignment on both sides:
<!DOCTYPE html> <html> <head> <title>HTML:<p> align attribute - Basic Tutorial Website(oldtoolbag.com)</title> </head> <body> <p align="right">A right-aligned paragraph.</p> <p align="left">A left-aligned paragraph.</p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the align attribute.
HTML5 The <p> align attribute is not supported. Please use CSS instead.
In HTML 4.01 In which, the align attribute of <p> is deprecated.
The align attribute specifies the alignment of the text within a paragraph.
In HTML 4.01 In which, the align attribute of <p> is deprecated, please use CSS instead.
CSS Syntax: <p style="text-align:right">
CSS Example: Align text in paragraphs
In our CSS tutorial, you can find more about text-align attribute details.
<p align="left|right|center|justify">
Value | Description |
---|---|
left | Left align text. |
right | Right align text. |
center | Center align text. |
justify | Extend the line, so that each line can have equal width (like in newspapers and magazines). |