The font property is shorthand that allows you to do one of two things: you can either set up six of the most mature font properties in one line, or you can set one of a choice of keywords to adopt a system font setting.

  • Initial valueSee individual properties
  • Applies toAll elements
  • InheritedYes
  • MediaVisual
  • Computed valueSee individual properties
  • AnimatableSee individual properties
  • CSS VersionCSS1, CSS2, CSS3
  • JavaScript
Formal syntax: [ [ <font-style> || <font-variant> || <font-weight> || <font-stretch> ]? <font-size> [ / <line-height> ]? <font-family> ] | caption | icon | menu | message-box | small-caption | status-bar 
  • <font-style>See the font-style CSS property for values.
  • <font-variant>See the font-variant CSS property for values.
  • <font-weight>See the font-weight CSS property for values.
  • <font-size>See the font-size CSS property for values.
  • <font-family>See the font-family CSS property for values.
body {
   font: bold .9em sans-serif;

Click the button below to experiment with this property.

Give it a Try!


Last updated on 23rd March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.