Text properties control text alignment, spacing and formatting such as underline
and case.
Property
|
Description
|
Values
|
Example
|
text-align
|
Sets justification to the left or right margin
or the centre of the page.
|
left
center
right
justify
string
|
{text-align: right}
|
text-decoration
|
Highlights text.
|
none
underline
overline
line-through
blink
|
{text-decoration: underline}
|
text-indent
|
Sets distance from left margin for the first
line of text.
|
millimetres (mm)
centimetres (cm)
inches (in)
points (pt)
picas (pc)
pixels (px)
height of font (em)
height of letter x (ex)
percentage (%)
|
{text-indent: 0.5in}
|
text-shadow
|
Creates a drop-shadow
|
|
{ text-shadow: 3px 3px 5px red }
|
text-transform
|
Changes the case of text
|
capitalise
uppercase
lowercase
none
|
{text-transform:lowercase;}
|
letter-spacing
|
Sets the amount of white space between letters
|
normal
length
|
{letter-spacing:2pt; }
|
line-height
|
Sets the distance between baselines.
|
normal
number
millimetres (mm)
centimetres (cm)
inches (in)
points (pt)
picas (pc)
pixels (px)
height of font (em)
height of letter x (ex)
percentage (%)
|
{line-height: 24pt}
|
vertical-align
|
Sets the vertical alignment of the baseline
|
baseline
sub
super
top
middle
bottom
text-top
text-bottom
|
{vertical-align:sub;}
|
whitespace
|
Sets how white space appears
|
normal
pre
nowrap
|
{ whitespace:pre;}
|
word-spacing
|
Sets the amount of white space between words
|
millimetres (mm)
centimetres (cm)
inches (in)
points (pt)
picas (pc)
pixels (px)
height of font (em)
height of letter x (ex)
percentage (%)
|
{word-spacing:0.5em;}
|