HTML Dog
Skip to navigation

CSS Property: text-align

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

Spacing-out text: text-indent, word-spacing, letter-spacing, and text-align.

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; }

Browser support