|
Collected by Elizabeth Janson Home Page |
|
|
Font attributes are 'font-style', 'font-variant', 'font-weight', with 'font-size' and 'line-height' listed second-last, and font-family is listed last when the term 'font' is used to combine several items in shorthand. How are Fonts described?Each attribute may be individually specified, for example the first one is <SPAN STYLE="font-style: normal ">normal</SPAN>
Each font attribute has an initial value for that property, and all unset values are reset to their initial values. For example, font-stretch: normal; font-weight: normal; font-style: normal; font-variant: normal; font-size: 16px; line-height: normal; font-family: sans-serif line-height
The line-height property (h4 in this diagram) determines the amount of space used for each line of text. This space includes room for the text itself, plus some amount of space between the lines. Note that line-height is not the spacing between the lines. It's the complete space needed to display one line of text.
CAUTION: This setting doesn't work well on text lines that use multiple font sizes on the same line of text.
Font Families
12 pt Times (serif), 12pt Verdana (sans serif), 12pt Monaco (monospace), 12pt Tahoma (fantasy), 12 pt Comic Sans MS (cursive). The font-families should be listed in preferred order, so that if the user system does not support one font, another font in the list will be used instead. BODY { font-family: Times, TimesRoman, serif } Font ShorthandThe 'font' property includes font-style, font-variant, font-weight, font-size, line-height, font-family. For example - P { font: italic bold small Arial, Verdana, sans-serif}really means this:
The FONT shorthand property allows you to specify one or more of the attributes. When using this shortcut, you must specify both a font size and a font family.
The font shorthand is a little more complicated than most, so here's a quick note: This topic is continued in Fonts - making choices.
|
CSS begins here |
|
This page is part of Elizabeth Janson's web site
http://www.geocities.com/elizatk/index.html
Tetbury residents in the Eighteenth Century my Australian Family History and Barrie, our Family Poet. |