0
0
CSSmarkup~5 mins

Font family in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Atext-align
Bfont-size
Cfont-family
Dfont-weight
How do you write multiple fonts in font-family?
ASeparate fonts with spaces
BSeparate fonts with commas
CUse semicolons between fonts
DWrite fonts inside parentheses
Which is a generic font family in CSS?
Aserif
BTimes New Roman
CArial
DCourier New
How should you write a font name with spaces in font-family?
AWith single or double quotes
BWithout quotes
CWith parentheses
DWith curly braces
What does the browser do if no specified fonts are available?
AShows an error
BLeaves text invisible
CUses the first font anyway
DUses the system default or generic font
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.