CSS -learn basic css by building a cat menu help

So Im really struggling on step 18 of this coding problem this is the problem:
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.

this is my code:

<style>
  body {

background-color: brown;
}

  </style>

And this is whats wrong with it :slightly_smiling_face:

Hint

You should use a body selector.

Im really confused because the background did turn brown too and im probably mistaken but i would think that the body word before the brackets is the body selector . What am i doing wrong please help?

Do you have all browser extensions switched off? They can affect the tests.
The code looks correct, so you could try resetting and resubmitting the code.
Also, try reloading the page with CTRL+F5 and submit it again.

thanks for replying so quickly well i tried all these things and the code is still wrong including the fact that that submit button isnt there :skull_and_crossbones: what do i do?

Hi!
Please include all your code. As there may be mistakes elsewhere and it will be easier to check if we can see everything.

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Also in future please use the ‘ask for help’ button. It will appear if you fail a lesson a few times and looks like a question mark. It will make a forum post for you with your formatted code, a link to the lesson and browser information.

<!DOCTYPE html>
<html lang="en">
  <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"/>
  </head>
  <body>

    <style>
      body {
  background-color: brown;
}



}

      </style>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>type or paste code here

this here is my code theres the styles.css too but i didnt include that bc i didnt write anything

There is your issue. You have a stray closing bracket in your style element.

hi, I took away the curly brace and its still wrong and i shouldnt have but ive been on this for free days and i skipped ahead and looked at the answer it was the exact same thing that i put coded? It just didnt have the style element but it asked me to put the style element maybe i read it wrong

So have you successfully passed this step now? If not, please paste your entire HTML code again, so we can check what might still be wrong.

i havent succesfully past the step heres my code all of it`

<!DOCTYPE html>
<html lang="en">
  <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"/>
  </head>
  <body>

    <style>
      body{
        background-color:brown;
      }

      </style>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>

Oh you’re on step 18 of the Café Menu?
You should be putting your style declarations in your CSS file now, not in style tags in your HTML. You have a CSS file in a separate tab?
Put the CSS code in there and remove the style tags from your HTML altogether.

thank you I’ll try that

i tried it it didnt work? Maybe i did it wrong i really am not sure could you explain what you said above in more detail? but im not sure if thats the problem with my code

This bit of your HTML file should be removed altogether.
The code in between these style tags should be pasted into your CSS file.

I tried that its still wrong :sleepy: but this time it didnt even turn the background brown

Can you post all of your css. Not just the background-color selector, so we can see everything going on. You can use the format button </> when you reply. Please paste all css code between the lines it gives you

Ok here it is

h1, h2, p {
  text-align: center;
}

That’s literally all of it and its in the styles.css file well im on step 33 while also trying to successfully pass step 18 so the white box in the preview can be blue if you get what i mean, im not joking the code i have in step 33 to turn the background brown is the same exact code i put for step 18 so Im so confused how i havent passed it

Where is this code, which you posted previously?

body {
  background-color: brown;
  }

ok ive reread through the whole thread of me asking questions to see if i made any mistake or missed any advice i moved the background part to the styles css and took it completely from the index html file so none of the styling for it is there this is what my styles css file looks like

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

i dont know if its right or wrong because the submit button isnt there and the background was brown when it was in index html but now that its in styles css its plain

You shouldnt have the style tag in there

oh thank you i think its right! The background stayed brown and everything was in styles css thank you thank you thank you but the submit button isnt there i just reloaded the page but i dont really know what else to do