0
0
CSSmarkup~20 mins

Color names in CSS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Color Name Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate
2:00remaining
What color will the text be?
Given the CSS rule below, what color will the text inside the paragraph appear as in a modern browser?
CSS
p { color: navy; }
AA dark blue color
BA bright red color
CA shade of green
DBlack color
Attempts:
2 left
💡 Hint
Think about the common color name 'navy' in CSS.
rendering
intermediate
2:00remaining
Which color name will make the background yellow?
You want to set the background color of a div to yellow using a CSS color name. Which option will do this correctly?
CSS
div { background-color: ???; }
Abackground-color: lemon;
Bbackground-color: gold;
Cbackground-color: lightyellow;
Dbackground-color: yellow;
Attempts:
2 left
💡 Hint
Look for the exact CSS color name for pure yellow.
selector
advanced
2:00remaining
Which CSS selector applies a red color to all

elements?

You want all

headings to have red text using a CSS color name. Which CSS rule below is correct?

Ah1 { color: red; }
Bh1 { background-color: red; }
C.h1 { color: red; }
D#h1 { color: red; }
Attempts:
2 left
💡 Hint
Remember how to select elements by tag name in CSS.
accessibility
advanced
2:00remaining
Which color name choice improves text readability for visually impaired users?
You want to choose a text color name that ensures good contrast on a white background for better accessibility. Which color name is best?
Alightgray
Bblack
Cyellow
Ddarkgray
Attempts:
2 left
💡 Hint
Think about which color contrasts most strongly with white.
🧠 Conceptual
expert
2:00remaining
How many standard CSS color names are there?
According to the CSS Color Module Level 4 specification, how many standard color names are defined for use in CSS?
A16
B512
C140
D256
Attempts:
2 left
💡 Hint
Think about the named colors inherited from HTML and extended in CSS.