Glubase - share your knowledge


All / Computers / Programming / CSS





  • View Command

CSS Reference

CSS font definition

Browser support
IEFFOpSaf

Type:

Syntax

font: font-style | font-variant | font-weight | font-size | font-family || caption || icon || menu || message-box || small-caption || status-bar ;

Description

The font property is a shorthand property for defining all attributes of a font.

Values

Value Description
font-style | font-variant | font-weight | font-size | font-family Sets the different properties of a font.
caption Defines the font that are used by captioned controls such as buttons.
icon Defines the font that are used by icons.
menu Defines the font that are used by dropdown menus.
message-box Defines the font that are used by dialog boxes.
small-caption Defines the font used for small controls.
status-bar Defines the font that are used by window status bars

 

Example

[Try this example yourself]
<p style="font:message-box">Message box text</p>
<p>Normal text</p>

Output

Message box text

Normal text

  • Comments

No comments added.