CSS font Property
CSS font Property
The font property is a shorthand property for:-
- font-style
- font-variant
- font-weight
- font-size/line-height
- font-family
Default Value:-
Its default value is the default value of font properties.
Syntax:-
Its syntax is:- font: font-style font-variant font-weight font-size/line-height font-family | caption | icon | menu | message-box | small-caption | status-bar | initial | inherit;
Further Explanation:-
Property/Value | Description |
---|---|
font-style | Specifies the font style. |
font-variant | Specifies the font variant. |
font-weight | Specifies the font weight. |
font-size/line-height | Specifies the font size and line height. |
font-family | Specifies the font family. |
caption | Uses the font that is used by captioned controls. |
icon | Uses the font that is used by icon labels. |
menu | Uses the fonts that are used by dropdown menus. |
message-box | Uses the fonts that are used by dialog boxes. |
small-caption | A smaller version of the caption font. |
status-bar | Uses the fonts that are used by the status bar. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |