What does the CSS property "font-display" control?
- How much space a font file occupies on the server
- How quickly a font is loaded and rendered on a web page
- The color and style of text
- The size of text
The "font-display" property in CSS controls how web fonts are displayed during loading. It's used to manage the flash of unstyled text (FOUT) or invisible text, making it an essential property for optimizing web font performance. Setting it to "swap" tells the browser to use a system font until the custom font is available, reducing FOUT.
Loading...
Related Quiz
- What is the total width of an element (including padding and border) when the 'box-sizing' property is set to 'content-box'?
- You've been asked to ensure that a custom web font falls back to a system font if it doesn't load within 3 seconds. How would you implement this?
- How can you specify that an animation should run in reverse order?
- How can you set a fallback font in case the primary font fails to load?
- If you have a CSS rule with !important and another rule with higher specificity targeting the same element, which one will take precedence?