CSS · At-rules, values and responsive design

@font-face

Declares a custom font and its source files, weight range and display behaviour.

Syntax
@font-face { … }

Example

Try it

Notes

Always include a local or system fallback so text renders while the font loads.

More in this group

@container @import @layer @media query @supports calc() clamp() Color functions

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