Extensible HyperText Markup Language

font

Definition

The font property is a shorthand method of setting font-style, font-variant, font-weight, font-size, line-height and/or font-family. A line-height setting can only be used when a font-size is specified. A / separates font-size and line-height. For example, 12px/14px means the font size is 12 pixels and line height is 14 pixels.

Example

  1. p {font: bold italic large/1.5em Arial, serif}

Characteristics

Possible values

In addition to values from font-style, font-variant, font-weight, font-size, line-height and/or font-family, the following can also be used:

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
Use the same computed value as the parent element for this property.

Default value

See individual properties

Applies to

All elements

Inherited

Yes

See also

XStandard XHTML WYSIWYG editor
A standards-compliant WYSIWYG editor component for content management applications. The editor generates valid XHTML and uses CSS for formatting. Free version is available.

Check out XStandard