Sign In Create Account
All HTML elements are selectors

We've used a number of HTML elements as CSS selectors so far: we've styled the HTML tags <h1></h1> with the CSS selector h1, <p></p> with p, and so on.

You may have guessed this, but if not, we'll say it outright: any HTML element can be a CSS selector! You can modify <ul>s, <table>s, and even the entire <body> by selecting ul, table, and body, respectively.

Instructions

Give it a whirl! Change the entire HTML body's background-color to #C6E2FF.

?
Stuck? Get a hint! Hint

You can target the <body> just like any other HTML element:

body {
    /*CSS stuff!*/
}
Files:
index.html
stylesheet.css
View Preview
Back to Editor
Back to editor
FULL PREVIEW
Start Here

Each lesson starts here. Read the explanation, then follow the instructions underneath. If you get stuck, you can click on the "Hint" for help.

Next  →
Enter your Code

Type your response to the instructions here, in your code editor.

Next  →
See What it Does

Here's where you can see how your code will render in your browser. This will update as you type.

Next  →
Submit!

Ready to see if your code does what it should? Click "Save + Submit" to check your code!

Click "Save + Submit" to run your code! Your code’s output will pop up on the screen.

I'm ready!

Sign in to Codecademy