CSS font Property Reference

The CSS font property is a standard property in CSS Fonts. Review its formal syntax, computed behavior, and practical declarations.

CSS font Property Reference

The CSS font property is a standard property in CSS Fonts. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

font overview

The CSS font property is a standard property in CSS Fonts. Review its formal syntax, computed behavior, and practical declarations.

The computed value normally inherits from the parent element when no declaration wins the cascade.

Syntax and formal definition

font formal syntax
FieldValue
Formal syntax[ [ <'font-style'> || <font-variant-css2> || <'font-weight'> || <font-width-css3> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'># ] | <system-family-name>
Initial valuefont-style, font-variant, font-weight, font-stretch, font-size, line-height, font-family
Applies toallElementsAndText
InheritedYes
Percentagesfont-size, line-height
Computed valuefont-style, font-variant, font-weight, font-stretch, font-size, line-height, font-family
Animation typefont-style, font-variant, font-weight, font-stretch, font-size, line-height, font-family
Mediavisual
Specification groupCSS Fonts
StatusStandard

Practical examples

These declarations demonstrate valid ways to set font. The initial and inherit global keywords remain available even when a property-specific value is preferable.

font live example
CSS .reset-example { font: initial; } .inherit-example { font: inherit; } @supports (font: initial) { .supported { font: initial; } }

Description

The CSS font property is a standard property in CSS Fonts. Review its formal syntax, computed behavior, and practical declarations.

References

  1. MDN: font
  2. MDN: CSS Properties Reference

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies