font-family
Quick Summary for font-family (@font-face)
The
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)
/* <string> values */ font-family: "font family"; font-family: 'another font family'; /* <custom-ident> value */ font-family: examplefont;
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 Posted in
12:22 am, February 22, 2022
Add Comment
Other Items in CSS
rgb()
rgba()
:right
right
@right-bottom
:root
rotate
rotate()
rotate3d()
rotateX()
rotateY()
rotateZ()
row-gap
ruby-align
ruby-position
saturate()
scale
scale()
scale3d()
scaleX()
scaleY()
scaleZ()
:scope
scroll-behavior
scroll-margin
scroll-margin-block
scroll-margin-block-end
scroll-margin-block-start
scroll-margin-bottom
scroll-margin-inline
scroll-margin-inline-end
scroll-margin-inline-start
scroll-margin-left
scroll-margin-right
scroll-margin-top
scroll-padding
scroll-padding-block
scroll-padding-block-end
scroll-padding-block-start
scroll-padding-bottom
scroll-padding-inline
scroll-padding-inline-end
scroll-padding-inline-start
scroll-padding-left
scroll-padding-right
scroll-padding-top
scroll-snap-align
scroll-snap-stop
scroll-snap-type
@scroll-timeline