HTML and CSS Reference
In-Depth Information
Table 4-4. Text Formatting Properties
Property
Initial Value
Inherited
Description
CSS2.1 properties
letter-spacing
normal
Yes
Adjusts the horizontal space between
characters.
text-align
Yes
Controls whether text is aligned to the left
or right, centered, or justified. The default
in English and other Western European
languages is left-aligned. In right-to-left
languages, such as Arabic, Hebrew, and Urdu,
it's right-aligned.
text-decoration
none
No
Draws a line under, over, or through text.
text-indent
0
Yes
Indents the first line of text.
text-transform
none
Yes
Converts text to initial capitals, all uppercase,
or all lowercase.
vertical-align
baseline
No
Controls the vertical alignment of inline
elements, such as <span> and images.
white-space
normal
Yes
Controls how spaces and word wrapping are
handled.
word-spacing
normal
Yes
Adjusts the width of the space character.
CSS3 properties
overflow-wrap
normal
Preferred name for word-wrap (see “Breaking
Overflow Text” later in this chapter).
Yes
text-align-last
auto
Yes
Sets the alignment of the last line of a text
block.
text-decoration-color
currentColor
No
Sets the color of underlines, overlines, and
line-throughs created by text-decoration .
text-decoration-line
none
No
Specifies what line decorations, if any, are
added to the text.
text-decoration-style
solid
No
Specifies the type of line used for text
decoration, for example, solid or wavy.
text-overflow
clip
No
Cuts off text that's too long to fit, optionally
replacing with ellipsis. Must be used in
conjunction with the overflow property (see
Chapter 6 ).
text-shadow
none
Yes
Applies one or more shadows to text.
word-wrap
normal
Yes
Allows long text, such as a URL, to be broken
if it would otherwise overflow.
 
Search WWH ::




Custom Search