Text

font

This is a shortcut method to include the following properties into one: font-family, font-variant, font-weight, font-size, line-height and font-style. Each value must be separated by a space and include at least font-size and font-family.

Example

font: Arial, Helvetica, sans-serif small-caps, bold, 14em, 20px italic;

Browser support

IE5.5+, FF1+, SA1.3+, OP9.2+

Values

bold Font weight value.
em Relative length value. A em unit is equal to the font-size value of the element used.
Font family Font family name if the name has a space use quotes. e.g. "Times New Roman"
Generic font Generic recognized fonts like serif, sans-serif, monotype, fantasy or cursive.
italic Makes text appear in italic.
large Absolute font size value.
medium Absolute font size value.
normal Sets the default value.
oblique Makes text appear in oblique format.
Percentage value The regular format of a percentage value.
px Pixel, a pixel unit represents a single dot on the screen.
small Absolute font size value.
small-caps Makes text appear in small-caps
x-large Absolute font size value.
x-small Absolute font size value.
xx-large Absolute font size value.
xx-small Absolute font size value.

Related properties

Can be used with..

Search the Soup!