1. Home
  2. Computing & Technology
  3. Web Design / HTML

font

By , About.com Guide

font Description:

The font property defines all the font properties in one single property.

font in CSS Versions:
font Syntax:

font: [ [ <font-style> || <font-variant> || <font-weight> ]? <font-size> [ / <line-height> ]? <font-family> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit

The following are for system fonts.

  • caption
    The font used for captioned controls (e.g., buttons, drop-downs, etc.).
  • icon
    The font used to label icons.
  • menu
    The font used in menus (e.g., dropdown menus and menu lists).
  • message-box
    The font used in dialog boxes.
  • small-caption
    The font used for labeling small controls.
  • status-bar
    The font used in window status bars.
  • inherit
    The element should have the same font setting as the parent.
font Initial Value:

Not defined.

font Applies To

All elements.

font Inheritance:

This property is inherited.

font Browser Support:
font Examples:

Standard font property

<p style="font : 12pt arial,geneva,sans-serif;">
This paragraph is 12 point sans-serif font.
</p>
With a font-variant
<p style="font : 12pt small-caps arial,geneva,sans-serif;">
This paragraph is the same as above only with small-caps.
</p>
font Special Notes:
  • font-size and font-family are required
More font Information:

Return to the Style Library

Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. About.com Web Design A to Z
  5. Books
  6. About Web Design Book
  7. AWD: Chapter 12
  8. CSS Style Property: font>

©2009 About.com, a part of The New York Times Company.

All rights reserved.