@font-face
@font-face is a CSS at-rule in the At-rules category. Defines custom fonts to be downloaded and used in the document. The syntax is @font-face { font-family: <name>; src: <url>; }. A typical example: @font-face { font-family: "MyFont"; src: url("myfont.woff2"); } It is commonly applied to markup such as <div class="demo">Sample</div> Browser support: Chrome 4+, Firefox 3.5+, Safari 3.1+, Edge 12+. A close relative is @media, which applies styles conditionally based on device features like viewport width. A close relative is @keyframes, which defines animation sequences with named keyframes. A close relative is @import, which imports styles from another stylesheet. More about this category: CSS at-rules — @media, @keyframes, @font-face, @supports and more. Related At-rules entries: @media, @keyframes, @import, @supports, @container, @layer, @scope, @starting-style. This page is part of the free CSS Reference documentation covering 841+ properties, selectors, functions, and at-rules, each with syntax, values, examples, and browser support.