| Microsoft Typography | Typography on the Web | Specifying fonts... | 5.2.5 'font-weight' | |||||||||||||||||||||||||||||||||||||||
|
Value: normal | bold | bolder | lighter | 100 | 200 | 300 | 400
| 500 | 600 | 700 | 800 | 900
Initial: normal Applies to: all elements Inherited: yes Percentage values: N/A Microsoft® Internet Explorer 3.0 support: partial. Microsoft Internet Explorer 3.0 supports normal and bold values. Microsoft Internet Explorer 4.0 support: yes.
P { font-weight: normal } /* 400 */
H1 { font-weight: 700 } /* bold */
The 'bolder' and 'lighter' values select font weights that are relative to the weight inherited from the parent: STRONG { font-weight: bolder }
Child elements inherit the resultant weight, not the keyword value. Fonts (the font data) typically have one or more properties whose values are names that are descriptive of the "weight" of a font. There is no accepted, universal meaning to these weight names. Their primary role is to distinguish faces of differing darkness within a single font family. Usage across font families is quite variant; for example a font that you might think of as being bold might be described as being Regular, Roman, Book, Medium, Semi- or DemiBold, Bold, or Black, depending on how black the "normal" face of the font is within the design. Because there is no standard usage of names, the weight property values in CSS1 are given on a numerical scale in which the value '400' (or 'normal') corresponds to the "normal" text face for that family. The weight name associated with that face will typically be Book, Regular, Roman, Normal or sometimes Medium. The association of other weights within a family to the numerical weight values is intended only to preserve the ordering of darkness within that family. However, the following heuristics tell how the assignment is done in typical cases:
The following two examples illustrate the process. Assume four weights in the "Example 1" family, from lightest to darkest: Regular, Medium, Bold, Heavy. And assume six weights in the "Example 2" family: Book, Medium, Bold, Heavy, Black, ExtraBlack. Note how in the second example it has been decided not to assign "Example 2 ExtraBlack" to anything.
There is no guarantee that there will be a darker face for each of the 'font-weight' values; for example, some fonts may have only a normal and a bold face, others may have eight different face weights. There is no guarantee on how a UA will map font faces within a family to weight values. The only guarantee is that a face of a given value will be no less dark than the faces of lighter values.
Dark blue text is taken from Cascading Style Sheets, level 1. W3C Recommendation 17 December 1996 - http://www.w3.org/pub/WWW/TR/REC-CSS1
|
|||||||||||||||||||||||||||||||||||||||
| Microsoft Typography | Typography on the Web | Specifying fonts... | 5.2.5 'font-weight' | |||||||||||||||||||||||||||||||||||||||