Name

text-align — IE4 Y/P | IE5 Y/Y | NN4 Y/P | Op3 Y/-

Synopsis

This sets the horizontal alignment of the text in an element, or more precisely, defines to which side of the element the line-boxes are aligned. The value justify is supported by programmatically adjusting the letter- and word-spacing of the line’s content, and results may vary by user agent.

Example

P {text-align: justify;}
H4 {text-align: center;}

Values

left | right | center | justify

Default

UA specific

Inherited

yes

Applies to

block

Get Cascading Style Sheets: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.