Learn Basic CSS by Building a Cafe Menu - Step 32

It wants me to put the class flavor in the p element, but when I do it say’s it’s wrong. What am I doing wrong here?

Your code so far

<!-- 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>
    <div class="menu">
      <main>
        <h1>CAMPER CAFE</h1>
        <p>Est. 2020</p>
        <section>
          <h2>Coffee</h2>
          <article>

<!-- User Editable Region -->

<p><div class="flavor" French Vanilla></p>
<p>3.00</p>

<!-- User Editable Region -->

          </article>
          <article>
            <p>Caramel Macchiato</p>
            <p>3.75</p>
          </article>
          <article>
            <p>Pumpkin Spice</p>
            <p>3.50</p>
          </article>
          <article>
            <p>Hazelnut</p>
            <p>4.00</p>
          </article>
          <article>
            <p>Mocha</p>
            <p>4.50</p>
          </article>
        </section>
      </main>
    </div>
  </body>
</html>
/* file: styles.css */
body {
  background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg);
}

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

.menu {
  width: 80%;
  background-color: burlywood;
  margin-left: auto;
  margin-right: auto;
}

Your browser information:

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

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 32

Link to the challenge:

I would reset. I’m not sure why you added the random div tag. The class should be added right after the p in <p>

I did that before, but when I did it just showed on the webpage as “class=‘flavor’ French Vanilla”. It also said it was incorrect and I needed c class with flavor.

There shouldn’t be a c class. You should only add the class attribute to the p element that’s already there.

That was a mistype. I have done that and it’s still wrong

Please copy-paste your actual code instead of posting a screenshot.

Your > are in the wrong places. You can’t put a > before you start adding attributes.

 <p>class="flavor" French Vanilla> </p>
           <p>3.00</p>

I’ve edited your code for readability. 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 (').

The attributes cannot come after a > for a tag

The text must stay after the > of the opening tag, not before it

I don’t see what you mean. The attribute is after the > of the opening tag.

Then what’s that symbol right after the p :stuck_out_tongue:

Your attribute cannot be after the >

The <p> is the opening tag.

Yup, and the attribute goes inside the opening tag, not after it. Otherwise the code can’t recognize it as an attribute.

So like this?

<p><class="flavor"> French Vanillia> </p>

Nope. You still have a couple extra > and now you also have an extra >

Sorry Jeremy. I can’t seem to get the correct way to show my code

So get rid of the > after the flavor?

It still says it’s wrong

What’s the code?

You need the > after the attribute. You should have zero > or < between the p (or div or a or whatever the tag is called) and the attribute.

Like you did here - zero < or > between div and class=...