Recall & Review
beginner
What CSS property is used to change the background color of an element?
The
background-color property is used to set or change the background color of an element.Click to reveal answer
beginner
How do you set a background color to blue using CSS?
Use
background-color: blue; inside a CSS rule to make the background blue.Click to reveal answer
beginner
Can you use color names, hex codes, and RGB values with
background-color?Yes! You can use color names like
red, hex codes like #ff0000, or RGB values like rgb(255, 0, 0) to set background colors.Click to reveal answer
intermediate
What happens if you set
background-color: transparent;?The background becomes see-through, showing whatever is behind the element.
Click to reveal answer
beginner
Why is it important to consider contrast when choosing a background color?
Good contrast between background and text colors helps people read easily and improves accessibility for everyone.
Click to reveal answer
Which CSS property changes the background color of an element?
✗ Incorrect
The
background-color property sets the background color of an element.How would you write CSS to make the background color red using a hex code?
✗ Incorrect
Use
background-color: #ff0000; to set the background to red using a hex code.What does
background-color: transparent; do?✗ Incorrect
It makes the background see-through, showing whatever is behind the element.
Which color format is NOT valid for
background-color?✗ Incorrect
font(12px) is not a color format and cannot be used for background color.Why should you choose background and text colors with good contrast?
✗ Incorrect
Good contrast improves readability and accessibility for all users.
Explain how to change the background color of a webpage using CSS.
Think about the CSS property and how you write a rule for the body element.
You got /3 concepts.
Why is it important to consider accessibility when choosing background colors?
Think about how colors affect how easy it is to see text.
You got /3 concepts.