Please how do I Add another style to the file that changes the background color property to brown for the body element

Tell us what’s happening:
Describe your issue in detail here.

  **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: <style>
<body>
h1, h2, p {
text-align: center;
}
</body>
</style>
<style>
<body>
h1, h2, p {
text-align: center;
}
</body>
</style>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Linux; Android 11; TECNO KF6i) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.101 Mobile Safari/537.36

Challenge: Step 19

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.


You need to add a rule with a selector for the body element and then add the background-color property with the value you want.

You shouldn’t be adding a body tag in your CSS file. Tags go only in the HTML file.

1 Like

Hello, this is similar to h1 and text-align with property center. Instead, You need to add background-color to the body element with brown property.
Mod Edit: SOLUTION REDACTED

Please explain more better

1 Like

First, I would reset the code. You have added a bunch of things you weren’t told to add.

Then, you need to create a new CSS rule for the body. A CSS rule has 3 parts:

h { // This is the *selector*
    // The selector says what this rule applies to
  color: green; // This is a attribute: value pair
  // This describes what should happen to the selected elements
}
2 Likes

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

1 Like

Ok, I will do it without spoilers in the future. :grinning:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.