The font-family CSS descriptor allows authors to specify the font family for the font specified in an @font-face rule.
The font-family CSS descriptor allows authors to specify the font family for the font specified in an @font-face rule.
/* <string> values */ font-family: "font family"; font-family: 'another font family'; /* <custom-ident> value */ font-family: examplefont;
<family-name>Specifies the name of the font family.
| Related at-rule | @font-face |
|---|---|
| Initial value | n/a (required) |
| Computed value | as specified |
<family-name> <family-name> = <string> | <custom-ident>+
@font-face { font-family: examplefont; src: url('examplefont.ttf'); }
| Specification |
|---|
| CSS Fonts Module Level 4 # font-family-desc |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
font-family |
4 |
12 |
3.5 |
6 |
10 |
3.1 |
2.2 |
18 |
4 |
10.1 |
2 |
1.0 |