Use Arial with a sans-serif fallback on #text.
Acceptance criteria
- 1.Use Arial with a sans-serif fallback on #text.
CSS Tutorial · CSS Text & Fonts
These 10 tasks go with the CSS Font Family chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “The CSS Font Family property is used to specify the typeface used to display text on a webpage.” Read the chapter.
1.Set a font stackexercise · easy · 10 min
Use Arial with a sans-serif fallback on #text.
Passes when: Use Arial with a sans-serif fallback on #text.
2.Quote a multi-word familyexercise · easy · 10 min · practice plan
Use 'Times New Roman' with a serif fallback.
Passes when: Use 'Times New Roman' with a serif fallback.
3.Build a three-step stackexercise · easy · 10 min · practice plan
Georgia, then 'Times New Roman', then serif.
Passes when: Georgia, then 'Times New Roman', then serif.
4.Use a generic familyexercise · easy · 10 min · practice plan
Set #title to monospace.
Passes when: Set #title to monospace.
5.Different fonts per elementexercise · medium · 10 min · practice plan
Monospace heading, Arial body.
Passes when: Monospace heading, Arial body.
6.Fix the missing fallbackbug fix · easy · 8 min
A stack should end in a generic family.
Passes when: A stack should end in a generic family.
7.Fix the mismatched fallbackbug fix · easy · 8 min · practice plan
A serif font should fall back to serif, not sans-serif.
Passes when: A serif font should fall back to serif, not sans-serif.
8.Fix the missing commabug fix · easy · 8 min · practice plan
Families in a stack are separated by commas.
Passes when: Families in a stack are separated by commas.
9.Fix the misspelled generic familybug fix · easy · 8 min · practice plan
The generic family is monospace.
Passes when: The generic family is monospace.
10.Fix the font on the wrong elementbug fix · easy · 8 min · practice plan
The heading should be the monospace one.
Passes when: The heading should be the monospace one.
Between them these tasks cover Font stacks, Quoting family names and Generic fallbacks.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.