Make #text 24px.
Acceptance criteria
- 1.Make #text 24px.
CSS Tutorial · CSS Text & Fonts
These 10 tasks go with the CSS Font Size 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 Size property is used to control the size of text displayed on a webpage.” Read the chapter.
1.Set a pixel sizeexercise · easy · 10 min
Make #text 24px.
Passes when: Make #text 24px.
2.Size a headingexercise · easy · 10 min · practice plan
Make #title 32px.
Passes when: Make #title 32px.
3.Use remexercise · easy · 10 min · practice plan
With a 16px root, set #text to 1.5rem.
Passes when: With a 16px root, set #text to 1.5rem.
4.Use emexercise · easy · 10 min · practice plan
With #wrap at 20px, set #text to 1.5em.
Passes when: With #wrap at 20px, set #text to 1.5em.
5.Build a type scaleexercise · medium · 10 min · practice plan
32px heading over 16px body text.
Passes when: 32px heading over 16px body text.
6.Fix the missing unitbug fix · easy · 8 min
A font size needs a unit.
Passes when: A font size needs a unit.
7.Fix the shortened propertybug fix · easy · 8 min · practice plan
The property is font-size.
Passes when: The property is font-size.
8.Fix rem confused with embug fix · easy · 8 min · practice plan
1.5rem against a 16px root should be 24px.
Passes when: 1.5rem against a 16px root should be 24px.
9.Fix the wrong root sizebug fix · easy · 8 min · practice plan
The root should be 16px so 1.5rem lands on 24px.
Passes when: The root should be 16px so 1.5rem lands on 24px.
10.Fix the inverted scalebug fix · easy · 8 min · practice plan
The heading should be larger than the body text.
Passes when: The heading should be larger than the body text.
Between them these tasks cover Absolute sizes, rem and em and Relative scaling.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.