@font-face

Allows you to load custom fonts onto a webpage, so you aren't limited to the standard 'web-safe' fonts installed on a user's computer.

/* Usage Example */
@font-face {
  font-family: ';MyCustomFont';
  src: url(';/fonts/my-font.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
Widely available Since 2016 96% global usage

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

1+
3.5+
3.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