font

A powerful shorthand property that lets you set many text-related properties (like size, weight, and family) all in one go. It's the most efficient way to define the overall look of your text.

It is documented as part of the CSS Fonts specification.

/* Usage Example */
body {
  font: bold 1rem/1.5 ';Inter', sans-serif;
  /* sets weight, size, line-height, and family in one line */
}

/* Syntax */
font: font-style;
font: font-variant-css;
font: font-weight;
font: font-width-css;
font: font-size;
font: line-height;
font: font-family;

/* Global values */
font: inherit;
font: initial;
font: revert;
font: revert-layer;
font: unset;
Widely available Since 2015 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

1+
1+
1+
12+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC