HTML and CSS Reference
In-Depth Information
Name
text-align
CSS2 values:
left
|
center
|
right
|
justify
| <string>
CSS2.1 values:
left
|
center
|
right
|
justify
CSS3 values:
[
start
|
end
|
left
|
center
|
right
|
justify
|
match-parent
] || <string>
Initial value:
User agent-specific, often based on writing direction (CSS2.1);
start
(CSS3)
Applies to:
Block-level elements
Inherited:
Yes
Computed value:
Same as declared value
Description:
Defines the horizontal alignment of text within a block-level element by defining the point to
which line boxes are aligned. The value
justify
is supported by allowing user agents to pro-
grammatically adjust the word (but not letter) spacing of the line's content; results may vary
by user agent.
Examples:
p {text-align: justify;}
h4 {text-align: center;}