font-family
Quick Summary for font-family (@font-face)
font-family CSS descriptor allows authors to specify the font family for the font specified in an @font-face rule.
Code Usage for font-family (@font-face)
<pre class="brush: css notranslate"><code><span class="token comment">/ <string> values /</span> <span class="token property">font-family</span><span class="token punctuation">:</span> <span class="token string">"font family"</span><span class="token punctuation">;</span> <span class="token property">font-family</span><span class="token punctuation">:</span> <span class="token string">'another font family'</span><span class="token punctuation">;</span> <span class="token comment">/ <custom-ident> value /</span> <span class="token property">font-family</span><span class="token punctuation">:</span> examplefont<span class="token punctuation">;</span> </code></pre>
More Details for font-family (@font-face)
font-family
The font-family CSS descriptor allows authors to specify the font family for the font specified in an @font-face rule.
Syntax
/* <string> values */ font-family: "font family"; font-family: 'another font family'; /* <custom-ident> value */ font-family: examplefont; Values
<family-name> Specifies the name of the font family.
Formal definition
| Related at-rule | @font-face |
|---|---|
| Initial value | n/a (required) |
| Computed value | as specified |
Formal syntax
<family-name>where
<family-name> = <string> | <custom-ident>+
Examples
Setting the font family name
@font-face { font-family: examplefont; src: url('examplefont.ttf'); } Specifications
| Specification |
|---|
| CSS Fonts Module Level 4 # font-family-desc |
See also
font-display font-stretch font-style font-weight font-variant font-feature-settings font-variation-settings src unicode-range Last modified: Aug 12, 2021, by MDN contributors
Select your preferred language English (US)EspañolFrançais日本語Русский中文 (简体) Change language
