2008 Oct 17
Font Families |
Font Size |
Font Adjust |
Font Stretch |
Font Style |
Font Variant |
Font Weights |
Font Property |
Font Face |
Line Height |
Cursive | Emulate handwriting; e.g. Author, Zapf Chancery |
Fantasy | Have a special characteristic; e.g. Dingbat, Klingon, Western, Woodblock. |
Monospace | Fixed width, not proportional; may or may not have serifs; e.g. Courier, Courier New, Andale Mono. |
Serif | Proportional and have serifs; e.g. Times,Georgia, NeCentury Schoolbook. |
Sans-serif | Proportional and do not have serifs; e.g. Arial, Geneva, Helvetica, Univers, Verdana. |
The property is font-family: and the value can be:
p { font-family: 'Courier New', sans-serif; }
The pair of single )or double) quote marks are needed if the family name is the same as a keywords for a font-family (e.g. 'serif') or contains: spaces, or non letters (e.g. % or $ or #).
There are also values for the font family to fit in with the system:
caption | Font used for captioned system controls (e.g. buttons). |
icon | Font used to label icons. |
menu | Font used in menus. |
message-box | Font used in dialogs. |
small-caption | Font used in small controls. |
status-bar | Font used in a status bar. |
The property is font-size: and the value can be:
IN CSS2 but dropped in CSS2.1
The property is font-size-adjust: and the value can be: none, inherit, <number>.
IN CSS2 but dropped in CSS2.1
The property is font-stretch: and the value can be: normal, wider, narrower, ultra-condensed, extra-condensed, condensed, semi-condensed, semi-expanded, expanded, extra-expanded, ultra-expanded, inherit.
The property is font-style: and the value can be: italic, oblique, normal, inherit. A style of italic is usually font with that in its name, while oblique is a slanted version of normal (and can be one with name label also of slanted or incline).
The property is font-variant: and the value can be: small-caps, normal, inherit.
The property is font-weight: and the value can be: normal (default), bold, bolder, lighter, inherit, 100 (lightest), 200, 300, 400 (normal), 500, 600, 700 (bold), 800, 900 (heaviest).
It is also possible, as a short hand, to specify just the font property and then have a space (and comma separetd) list of values, e.g.:
p {font: bold, italic 600 small-caps 24px Arial, Helvetica;}
The required values for the font property are font-size and font-family in that order.
IN CSS2 but dropped in CSS2.1 since no browser implemented it.
The entity is @font-face and could have downloaded with src property, e.g.:
@font-face {font-family: "Star Trek"; src: url(http://www.fontzoo.com/fonts/ps/startrek.ps);}}
The line height is a text property, not a font property, but it can be included as a modifier to font-size using a slash followed by the value for line height, e.g.:
p {font-size: 24px/1.2;}
p {font: bold, italic 600 small-caps 24px/1.2 Arial, Helvetica;}