The font-family CSS descriptor allows authors to specify the font family for the font specified in an @font-face rule.

Related at-rule@font-face
Initial valuen/a (required)
Mediaall
Computed valueas specified
Canonical orderthe unique non-ambiguous order defined by the formal grammar

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 syntax

<family-name>

where
<family-name> = <string> | <custom-ident>+

Examples

@font-face {
  font-family: examplefont;
  src: url('examplefont.ttf');
}

Specifications

Specification Status Comment
CSS Fonts Module Level 3
The definition of 'font-family' in that specification.
Candidate Recommendation Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support4123.5693.1
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support2.2 ?124123.1 Yes

Document Tags and Contributors

 Contributors to this page: fscholz, mfluehr, Sebastianz, Sheppy, PushpitaPikuDey, Guillaume-Heras
 Last updated by: fscholz,