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 |
Browser compatibility
BCD tables only load in the browser