# Learn Basic CSS by Building a Cafe Menu - Step 18

**URL:** <https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041>\
**Category:** Curriculum Help\
**Created:** [January 21, 2025, 1:10am UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041 "2025-01-21T01:10:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![FELOPO](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@FELOPO](https://forum.freecodecamp.org/u/FELOPO)\
**Post date:** [January 21, 2025, 1:10am UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041/1 "2025-01-21T01:10:51Z")

</div>

### Tell us what’s happening:

tep 18  
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.

### Your code so far

```html
<!-- file: index.html -->
<!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>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>

```

```css
/* file: styles.css */

/* User Editable Region */

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

/* User Editable Region */

```

### Your browser information:

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36`

### Challenge Information:

Learn Basic CSS by Building a Cafe Menu - Step 18

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-basic-css-by-building-a-cafe-menu/step-18)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![HungryBee](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hungrybee/32/345970_2.png) [@HungryBee](https://forum.freecodecamp.org/u/HungryBee)\
**Post date:** [January 21, 2025, 1:14am UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041/2 "2025-01-21T01:14:21Z")

</div>

Hello FELOPO,

You correctly changed the background colour of the `h1`, `h2`, and `p` elements. But the question asked to change the background of the `body` element instead.

---

<div class="post-metadata">

**Author:** ![FELOPO](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@FELOPO](https://forum.freecodecamp.org/u/FELOPO)\
**Post date:** [January 21, 2025, 1:47am UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041/3 "2025-01-21T01:47:47Z")

</div>

can you help me because im a bit stuck there

---

<div class="post-metadata">

**Author:** ![HungryBee](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hungrybee/32/345970_2.png) [@HungryBee](https://forum.freecodecamp.org/u/HungryBee)\
**Post date:** [January 21, 2025, 1:48am UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041/4 "2025-01-21T01:48:57Z")

</div>

Yes of course, which part are you stuck on right now?

---

<div class="post-metadata">

**Author:** ![FELOPO](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@FELOPO](https://forum.freecodecamp.org/u/FELOPO)\
**Post date:** [January 21, 2025, 1:51am UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041/5 "2025-01-21T01:51:01Z")

</div>

Sorry, your code does not pass. You’re getting there.

You should use a body selector.

---

<div class="post-metadata">

**Author:** ![HungryBee](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hungrybee/32/345970_2.png) [@HungryBee](https://forum.freecodecamp.org/u/HungryBee)\
**Post date:** [January 21, 2025, 1:53am UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041/6 "2025-01-21T01:53:13Z")

</div>

Assuming your code is still the same as the first post, this part is correct, `{background-color: brown;} ` but the question wants you to change the `body` element not `h1, h2, p` so you will have to change that accordingly.

---

<div class="post-metadata">

**Author:** ![FELOPO](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@FELOPO](https://forum.freecodecamp.org/u/FELOPO)\
**Post date:** [January 21, 2025, 1:56am UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041/7 "2025-01-21T01:56:17Z")

</div>

im confused right now about the body element. can you give me the code for it?

---

<div class="post-metadata">

**Author:** ![HungryBee](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hungrybee/32/345970_2.png) [@HungryBee](https://forum.freecodecamp.org/u/HungryBee)\
**Post date:** [January 21, 2025, 2:00am UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041/8 "2025-01-21T02:00:37Z")

</div>

That’s not allowed unfortunately.

To clarify, in the code that you already have h1, h2, p are all elements. And in the first part of the code you changed these elements to make sure the text will be centered.

Now ‘body’ is also an element. It’s quite literally the body of your html document. Where you put all the html code to make the site. (Like the text, and headers etc).

You can change individual elements like you did before, but if change the css of body it will change the entire page. They want you to change the background of the entire site brown.

You already worked out how to change backgrounds as you wrote above:  
`h1, h2, p{background-color: brown;}`  
Now instead of changing it for these elements, try and replace the `h1, h2, p` to `body` instead.

---

<div class="post-metadata">

**Author:** ![FELOPO](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@FELOPO](https://forum.freecodecamp.org/u/FELOPO)\
**Post date:** [January 21, 2025, 2:03am UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041/9 "2025-01-21T02:03:33Z")

</div>

Thank you i just did due to your assistance.  
Anyway, Im Felix from Ghana.  
I think i will be happy to know you are okay with it

---

<div class="post-metadata">

**Author:** ![HungryBee](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hungrybee/32/345970_2.png) [@HungryBee](https://forum.freecodecamp.org/u/HungryBee)\
**Post date:** [January 21, 2025, 2:04am UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041/10 "2025-01-21T02:04:05Z")

</div>

Yay Im glad, good job!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [July 22, 2025, 2:07pm UTC](https://forum.freecodecamp.org/t/learn-basic-css-by-building-a-cafe-menu-step-18/731041/12 "2025-07-22T14:07:27Z")

</div>

Closed on July 22, 2025, 2:07pm UTC

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