CSS text-align

Definition

The text-align property aligns the text in an element.

Inherited: Yes


Examples



p

{
text-align: center
}



Possible Values



Value Description
left Aligns the text to the left.

Default value: Browser dependent

right Aligns the text to the right
center Centers the text
justify