font-family
The font-family property specifies the font family for text.
Formal Syntax
[ <family-name> | <generic-family> ]#
JavaScript Access
// Access via element.style
element.style.fontFamily = 'value';
Browser Support
| Feature | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| font-family | 1 | 1 | 1 | 12 |
| cursive | 1 | 1 | 1 | 12 |
| fangsong | 1 | 1 | 1 | 12 |
| fantasy | 1 | 1 | 1 | 12 |
| kai | 1 | 1 | 1 | 12 |
| khmer-mul | 1 | 1 | 1 | 12 |
| math | 109 | 145 | — | 109 |
| monospace | 1 | 1 | 1 | 12 |
| nastaliq | 1 | 1 | 1 | 12 |
| sans-serif | 1 | 1 | 1 | 12 |
| serif | 1 | 1 | 1 | 12 |
| system-ui | 56 | 92 | 11 | 79 |
| ui-monospace | — | — | 13.1 | — |
| ui-rounded | — | — | 13.1 | — |
| ui-sans-serif | — | — | 13.1 | — |
| ui-serif | — | — | 13.1 | — |
Related Properties
- font
- font-feature-settings
- font-kerning
- font-language-override
- font-optical-sizing
- font-palette
- font-size
- font-size-adjust
- font-style
- font-synthesis
- font-synthesis-small-caps
- font-synthesis-style
- font-synthesis-weight
- font-variant
- font-variant-alternates
- font-variant-caps
- font-variant-east-asian
- font-variant-emoji
- font-variant-ligatures
- font-variant-numeric
- font-variant-position
- font-variation-settings
- font-weight
- font-synthesis-position 🧪
- font-width 🧪
- font-stretch 🗑️