Style font Property
Style font Property
The font property is used to either set or return the font property of an element. It is a shorthand property for:-
- font-style
- font-variant
- font-weight
- font-size
- line-height
- font-family
Default:-
Its default value is the default value of font properties.
Syntax:-
Its syntax is:- object.style.font OR object.style.font = font-style font-variant font-weight font-size/line-height | caption | icon | menu |
message-box | small-caption | status-bar | initial | inherit
Return:-
Its return is:- string having font property of an element
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. |