Recall & Review
beginner
What is the purpose of the
font-family property in CSS?The
font-family property sets the typeface for text on a webpage, controlling how the text looks by choosing a font or a list of fonts.Click to reveal answer
beginner
How do you specify multiple fonts in
font-family and why?You list fonts separated by commas, like
font-family: Arial, Helvetica, sans-serif;. This provides fallback fonts if the first is not available on the user's device.Click to reveal answer
beginner
What is a generic font family in CSS?
A generic font family is a broad category like
serif, sans-serif, monospace, which tells the browser to use any font of that style if specific fonts are unavailable.Click to reveal answer
beginner
Why should font names with spaces be in quotes in
font-family?Font names with spaces (like "Times New Roman") must be in quotes so the browser reads the whole name as one font instead of separate words.
Click to reveal answer
beginner
What happens if none of the fonts in
font-family are available?The browser uses the default font of the system or the generic font family specified last in the list to display the text.
Click to reveal answer
Which CSS property controls the typeface of text?
✗ Incorrect
The
font-family property sets the font type for text.How do you write multiple fonts in
font-family?✗ Incorrect
Fonts are separated by commas to provide fallback options.
Which is a generic font family in CSS?
✗ Incorrect
serif is a generic font family representing fonts with small lines at the ends of characters.How should you write a font name with spaces in
font-family?✗ Incorrect
Font names with spaces must be in quotes to be read correctly.
What does the browser do if no specified fonts are available?
✗ Incorrect
The browser falls back to a generic or system default font to display text.
Explain how to use the
font-family property to ensure text displays well on different devices.Think about listing fonts and why quotes matter.
You got /4 concepts.
Describe what a generic font family is and give examples.
Generic fonts help browsers pick a similar style if specific fonts are missing.
You got /3 concepts.