CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS font Property

CSS font Property

 

 

The font property is a shorthand property for:-

  1. font-style
  2. font-variant
  3. font-weight
  4. font-size/line-height
  5. 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.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS