Easy Tutorial
❮ Tag Tbody Av Prop Preload ❯

HTML <p> align Attribute

HTML <p> Tag

Example

A paragraph aligned to the right:


Browser Support

All major browsers support the align attribute.


Definition and Usage

In HTML 4.01, the align attribute of <p> is deprecated.

The align attribute specifies the alignment of text within a paragraph.


Compatibility Notes

In HTML 4.01, the align attribute of <p> is deprecated. Use CSS instead.

CSS syntax: <p style="text-align:right">

CSS Example: Aligning Text in a Paragraph

In our CSS tutorial, you can find more details about the text-align Property.


Syntax

Attribute Values

Value Description
left Aligns the text to the left.
right Aligns the text to the right.
center Centers the text.
justify Stretches the lines so that each line has equal width (like in newspapers and magazines).
❮ Tag Tbody Av Prop Preload ❯