Make #text bold.
Acceptance criteria
- 1.Make #text bold.
CSS Tutorial · CSS Text & Fonts
These 10 tasks go with the Web Fonts & Typography 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: “Set readable type, load web fonts responsibly, and understand the properties that shape a line of text. You will work with readable line height and measure, resilient font stacks, @font-face loading, font-display, and variable font axes.” .
1.Bold the paragraphexercise · easy · 10 min
Make #text bold.
Passes when: Make #text bold.
2.Use a numeric weightexercise · easy · 10 min · practice plan
Give #title a semi-bold weight of 600, lighter than a heading's default.
Passes when: Give #title a semi-bold weight of 600, lighter than a heading's default.
3.Italicise the textexercise · easy · 10 min · practice plan
Make #text italic.
Passes when: Make #text italic.
4.Space the lettersexercise · easy · 10 min · practice plan
Give #title 2px of letter spacing.
Passes when: Give #title 2px of letter spacing.
5.Set a readable line heightexercise · medium · 10 min · practice plan
With #text at 16px, use an unitless line-height of 1.5.
Passes when: With #text at 16px, use an unitless line-height of 1.5.
6.Fix the invalid weight keywordbug fix · easy · 8 min
The keyword for heavy text is bold.
Passes when: The keyword for heavy text is bold.
7.Fix the weight with a unitbug fix · easy · 8 min · practice plan
A numeric font weight is unitless.
Passes when: A numeric font weight is unitless.
8.Fix the wrong propertybug fix · easy · 8 min · practice plan
Slanted text uses font-style.
Passes when: Slanted text uses font-style.
9.Fix word spacing used for lettersbug fix · easy · 8 min · practice plan
This should space individual letters.
Passes when: This should space individual letters.
10.Fix the cramped line heightbug fix · easy · 8 min · practice plan
1.5 is far more readable than 1.
Passes when: 1.5 is far more readable than 1.
Between them these tasks cover Weight and style, Letter spacing and Line height.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.