Example values:
- bold
- italic
- bold italic
A size can be defined in many different ways, but the most common methods are to specify the height of the font in points (pt) or pixels (px).
Example values:
- 10pt
- 11px
- 14em
- x-small
Font Family specifies the font face used for text. If you are familiar with appropriate values for the deprecated HTML <font face=""> syntax, any value valid as the 'face' of a <font> tag is valid here.
You may specify a single font, or a list of fonts separated by commas.
Comma separated lists are employed to make sure that visitors to your site whose computers do not have the specific font specified installed will still see a font that is something like what you intended. For example, if you set the font family value to tahoma but a visitor did not have the Tahoma font installed, their browser would show your site using the system default font. On the other hand, if you specified the value as tahoma, verdana, arial, sans-serif the browser would traverse the list looking for the first font that it can use.
Note that fonts whose names contain spaces must be enclosed in quotes.
Example values:
- verdana
- verdana, arial, helvetica, sans-serif
- verdana, geneva, lucida, "lucida grande", arial, helvetica, sans-serif
In practice, this means that the following set of values...
Font Style | bold italic |
Font Size | 10pt |
Font Family | verdana, arial, sans-serif |
font-weight: bold; font-style: italic; font-size: 10pt; font-family: verdana, arial, sans-serif;
font: bold italic 10pt verdana, arial, sans-serif;