CSS Exercises
Practice your CSS skills with hands-on exercises.
CSS Exercises
Practice makes perfect! Work through our CSS exercises to reinforce what you've learned.
Exercise 1: Selectors
Select all <p> elements and change their color to red.
Input:
<style>
_____ {
color: red;
}
</style>
Answer: p
Exercise 2: Backgrounds
Set the background color of the page to "lightblue".
Input:
body {
___________: lightblue;
}
Answer: background-color