CSS · Properties — CSS Fonts

font

The CSS font property. Initial value: font-style,font-variant,font-weight,font-stretch,font-size,line-height,font-family. Inherited.

Syntax
font: [ [ <'font-style'> || <font-variant-css2> || <'font-weight'> || <font-width-css3> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'># ] | <system-family-name>

Example

Try it

Notes

Media: visual. Applies to: allElementsAndText. Computed value: font-style,font-variant,font-weight,font-stretch,font-size,line-height,font-family.

More in this group

font-feature-settings font-kerning font-language-override font-optical-sizing font-palette font-size-adjust font-synthesis font-synthesis-position

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course