font

Syntax

font: font-style font-variant font-weight font-size/line-height font-family

In use

font: italic small-caps bold Arial, Helvetica, sans-serif;

Mandatory values:

Without these values entire line of code will be null.

  • font-size
  • font-family
font-size: medium|xx-small|x-small|small|large|x-large|xx-large|smaller|larger|length|initial|inherit;
font-family: font family name | initial | inherit

Optional values:

Omitting these values doesn’t make mistake.

  • font-style
  • font-variant
  • font-weight

If omitted one of values the code is valid. Omitted value doesn’t have value of its parent value.

font-style: normal | italic | oblique | initial | inherit
font-variant: normal | small-caps | initial | inherit
font-weight: normal | bold | bolder | lighter | 100, 200, .. 400 (normal), 500,..900 | initial | inherit

Resources

MDN