Properties 403
CSS
Properties
Web Design in a Nutshell, eMatter Edition
font
Values:
font-style|font-variant|font-weight|font-size|
line-height|font-family
Examples:
EM { font: 12pt Times, serif }
H1 { font: oblique bolder 18pt Helvetica, sans-serif }
Applies to:
All elements
Inherited:
Yes
Thefontproperty is a shorthand property for specifying all the available font
controls in a single rule. Values should be separated by character spaces. The
fontproperty must contain a size attribute before the font name. In this
property, the order of the enclosed values is important (although not every
value needs to be present) and must be listed as follows:
{ font: weight style variant size/line-height font-name(s) }
color
Values:
color name|RGB color value
Examples:
BLOCKQUOTE { color: navy }
H1 { color: #666633 }
Applies to:
Block-level elements
Inherited:
Yes
This property is used to describe the text (a.k.a. “foreground”) color of an
element. For an explanation of specifying color values, see the “Color Values”
section earlier in this chapter.
line-height
Values:
normal|number|length|percentage
Example:
P { line-height: 1.2 }
P { line-height: 1.2em }
P { line-height: 120% }