Make the #box text red.
Acceptance criteria
- 1.Make the #box text red.
CSS Tutorial · CSS Colors and Backgrounds
These 10 tasks go with the CSS Colors 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: “Choose CSS colors for text, backgrounds, borders, and interface states while preserving contrast, inheritance, and consistent design tokens.” Read the chapter.
1.Colour the textexercise · easy · 10 min
Make the #box text red.
Passes when: Make the #box text red.
2.Colour the backgroundexercise · easy · 10 min · practice plan
Give #box a teal background.
Passes when: Give #box a teal background.
3.Colour a borderexercise · easy · 10 min · practice plan
Give #box a 2px solid goldenrod border.
Passes when: Give #box a 2px solid goldenrod border.
4.Make text invisibleexercise · easy · 10 min · practice plan
Set the #box text colour to transparent.
Passes when: Set the #box text colour to transparent.
5.Pair text and backgroundexercise · medium · 10 min · practice plan
White text on a navy background.
Passes when: White text on a navy background.
6.Fix the misspelled colour namebug fix · easy · 8 min
That is not a recognised colour keyword.
Passes when: That is not a recognised colour keyword.
7.Fix the wrong propertybug fix · easy · 8 min · practice plan
The background should be teal, not the text.
Passes when: The background should be teal, not the text.
8.Fix the border with no stylebug fix · easy · 8 min · practice plan
A border with no style is not drawn.
Passes when: A border with no style is not drawn.
9.Fix the British spellingbug fix · easy · 8 min · practice plan
The CSS property is spelled color.
Passes when: The CSS property is spelled color.
10.Fix the wrong colourbug fix · easy · 8 min · practice plan
The background should be navy, not maroon.
Passes when: The background should be navy, not maroon.
Between them these tasks cover Named colors, Text and background color and transparent.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.