Changing background color

Tell us what’s happening:
Describe your issue in detail here.
why is this not working to change the background to brown

**Your code so far**
\ file: <!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Cafe Menu</title>
  <link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <header>
    <h1>CAMPER CAFE</h1>
    <p>Est. 2020</p>
  </header>
  <main>
    <section>
      <h2>Coffee</h2>
    </section>
  </main>
</body>
<html>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Cafe Menu</title>
  <link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <header>
    <h1>CAMPER CAFE</h1>
    <p>Est. 2020</p>
  </header>
  <main>
    <section>
      <h2>Coffee</h2>
    </section>
  </main>
</body>
<html>
\ file: h1, h2, p {
text-align: center;
}<body style="background-color:brown;">
</body>

h1, h2, p {
text-align: center;
}<body style="background-color:brown;">
</body>

  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15

Challenge: Step 19

Link to the challenge:

Hey there :wave: Welcome to the forums :slightly_smiling_face:

What seems to be the issue? The more details you give us the better we can help.

this is what they ask for
The text is centered again so the link to the CSS file is working. Add another style to the file that changes the background-color property to brown for the body element.

and this is what im adding to the css file but when it fails it sais i should use a body selector why

This is not a body selector.

These are selectors

1 Like

It looks here like you are trying to use HTML code with inline CSS in your CSS file. CSS uses selectors instead of HTML so you shouldn’t be adding an HTML element.

For example if I wanted to create a selector for all <p> elements, and turn them red I would do:

p {
  color: red;
}

So how would you do this for <body>?

2 Likes

done it should be like this
body {background-color:lightblue;}

1 Like

Assuming you want a light blue background, than yes!

Though I think the lesson asks for a different color.

no no i need brown i just did the same code but put brown instead of light blue

1 Like

You got it then!