The cover of The Complete Idiot's Guide to Create a Web Page The Complete Idiot's Style Sheets Reference

| Index | Current Category: Fonts |
| Previous Style: float | Next Style: font-family |


font

A shorthand style that enables you to set multiple font properties at once.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 3.0 and later 4.0 and later
Notes: Possible Values:
[font-family]
See font-family.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 3.0 and later 4.0 and later

[font-size]
See font-size.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 3.0 and later 4.0 and later

[font-style]
See font-style.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 3.0 and later 4.0 and later

[font-variant]
See font-variant.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 3.0 and later 4.0 and later

[font-weight]
See font-weight.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 3.0 and later 4.0 and later

[line-height]
See line-height.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 3.0 and later 4.0 and later

[system]
Sets a system font.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS2 and later Not supported Not supported

Notes:
  • Possible values:
    caption Sets the font for the captions on toolbar buttons, etc..
    icon Sets the font for icon labels.
    menu Sets the font for pull-down menu text.
    message-box Sets the font for dialog box text.
    small-caption Sets the font for small controls(?).
    status-bar Sets the font for status bar text.

Example:
<DIV STYLE="font: italic bold 16pt Arial">style weight size family</DIV>
<DIV STYLE="font: small-caps 600 Arial 'MS Sans Serif'">variant weight family</DIV>
<DIV STYLE="font: italic bolder x-large 150% 'Comic Sans MS'">style weight size line-height family</DIV>
How It Looks:
style weight size family
variant weight family
style weight size line-height family

| Index | Current Category: Fonts |
| Previous Style: float | Next Style: font-family |