HTML Dog

Skip to navigation

CSS Property: text-align

The alignment of a block of text and other inline boxes.

Possible Values

ValueDescription
leftText aligns to left edge of the containing box.
rightText aligns to right edge of the containing box.
centerText centred within its containing box.
justifyText aligned both left and right.
inherit
initial
unset

Example


p { text-align: center; }