font-size
Value: xx-small | x-small | small | medium | large | x-large | xx-large | <number> | <length> | <percentage>
Initial: medium
Applies to: all elements
Inherited: yes
Percentage values: relative to parent's font size
The keyword values can be used to specify a font-size that will be determined by the browser, according to an internal table. font-family The value is a prioritized list of font family names and/or generic family names. Values are separated by a comma to indicate that they are alternatives:
<font-family> <generic-family> It is useful to offer a generic font family as a last alternative, in case the specified font is not available on the viewers system.
Font names containing white space should be quoted:
font-weight The keywords can either be absolute or relative. For example :
This would lead to font-style The keyword values can be combined. Legal combinations of the values are:
one of the four values ('normal', 'italic', 'oblique', 'small-caps') As with other font properties, if the specified style cannot be achieved, the browser should select an approximation.
line-height This property sets the the distance between two adjacent lines' baselines. It only applies to block-level elements, (i.e. Negative values are not allowed.
font This property provides a wrapper for defining multiple font properties, using the properties described above). See the above properties for their allowed values. Setting of this property is equivalent to setting of the individual properties.
For the 'font-size' property' length units (e.g. 'em' and 'ex'), refer to the font size of the parent element.
Value: [[<family-name> | <generic-family>],]* [<family-name> | <generic-family>]
Initial: UA specific
Applies to: all elements
Inherited: yes
Percentage values: N/A
There are two types of list values:
BODY { font-family: gill, helvetica, sans-serif }
The name of a font family of choice. In the last example, "gill" and "helvetica" are font families.
In the example above, the last value is a generic family name. The following generic families are defined:
'serif' (e.g. Times)
'sans-serif' (e.g. Helvetica)
'cursive' (e.g. Zapf-Chancery)
'fantasy' (e.g. Western)
'monospace' (e.g. Courier)
BODY { font-family: "new century schoolbook", serif }
<BODY STYLE="font-family: 'My own font', fantasy">
Value: extra-light | light | demi-light | medium | demi-bold | bold | extra-bold | bolder | lighter
Initial: medium
Applies to: all elements
Inherited: yes
Percentage values: N/A
P { font-weight: medium }
STRONG { font-weight: bolder }
<STRONG>
elements being 'bolder' than their parent. If the parent is 'medium', a <STRONG>
element will have the value of 'bold'. I.e., a relative value indicates a change of two positions relative to the list of absolute values. Child elements inherit the resultant weight, not the keyword value.
Value: normal | italic || small-caps | oblique || small-caps | small-caps
Initial: normal
Applies to: all elements
Inherited: yes
Percentage values: N/A
'italic' or 'oblique', combined with 'small-caps'
Value: <number> | <length> | <percentage>
Initial: UA specific (see below)
Applies to: block-level elements
Inherited: yes
Percentage values: refers to the font size of the element itself
<BLOCKQUOTE>
, <ADDRESS>
etc.)
Value: [<font-weight> || <font-style>]? <font-size> [ / <line-height> ]? <font-family>
Initial: not defined
Applies to: all elements
Inherited: yes
Percentage values: allowed on <font-size> and <line-height> only