[Cascading Style Sheets]
[Previous page] [Next page] [Section contents page]

Text Properties and Values

Below are style properties and values for text. (I've included here only properties now supported by Internet Explorer and Netscape -- I'll add others when they are supported)

Commonly Used Properties and Values for Cascading Style Sheets

Table Legend
IE3 Supported in Internet Explorer 3.x
IE4 Supported in Internet Explorer 4.x
N4 Supported in Netscape 4.x
pt = points
in = inches
cm = centimeters
px = pixels
em = height of element's font
(the em unit is not yet widely supported and should be used with caution)
  Property Description Values Example
Text Properties
IE3 IE4
N4
line-height (inherited) Sets the distance between baselines of text size (pt, in, cm, px, em)
percentage (%) of font-size
{ line-height: 18pt } { line-height: 120% }
IE3 IE4
N4
text-decoration (not inherited) Underlines or otherwise highlights text none
underline
overline
line-through
{ text-decoration: underline }
IE3 IE4
N4
text-align (inherited) Sets alignment of text to the left or right margin, or to the center of the page left
center
right
{ text-align: right }
IE3 IE4
N4
text-indent (inherited) Sets distance from left margin size (pt, in, cm, px) { text-indent: 0.5in }
IE4
vertical-align (not inherited) aligns text vertically within the element baseline
sub
super
top
text-top
middle
bottom
text-bottom

percentage of line-height from baseline (%)
{ vertical-align: super }
IE4
N4
text-transform (inherited) Sets case rules for text capitalize (capitalizes first letter of each word)
uppercase
lowercase
{ text-transform: capitalize }
IE4
letter-spacing (inherited) sets letter-spacing for text
(support expected in IE 4.0 final release)
normal,
size (pt, in, cm, px, em)
{ letter-spacing: 2pt }
[Previous page] [Next page] [Section contents page]