Learn Basic CSS by Building a Cafe Menu - Step 32

Tell us what’s happening:

Hello all, it’s me again… I’m finding myself confused on the syntax order. I see that I need to have my class=“flavor” class name in my paragraph tag, but i’ve confused myself as to where to go next.

–Also, thank you all in advance, you’ve made this process of learning from nothing not seem so daunting.

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>French Vanilla<class="flavor"</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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Challenge Information:

Learn Basic CSS by Building a Cafe Menu - Step 32

Also for reference, The prompt is as follows:
" Step 32

The flavors and prices are currently stacked on top of each other and centered with their respective p elements. It would be nice if the flavor was on the left and the price was on the right.

Add the class name flavor to the French Vanilla p element."

and my error message reads as such:
" You should add the flavor class to your p element."

HTML attributes always go inside the opening tag of their element.

EXAMPLE:

<p style="color: red">This text is red.</p>
2 Likes

HTML attributes always should be written in the opening tage. removed

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

It’s this part that’s incorrect. All attributes should appear within the opening tag of an element.

For instance:

<h1 class="title-text">Page Title</h1>
3 Likes

thanks everyone that worked perfectly. I appreciate all the help.

1 Like

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

I actually didn’t post the full working solution. I told him which line of his code the error was in, told him that all attributes should appear within the opening tag of an element, and gave an example of what I meant that used random code rather than the code hes working on. Is this not the same as fCC giving the information, and showing us an example line of code, the way they do in so many of the lessons? I’m confused as to which part of my response constitutes a full working solution. It’s not like they could copy and paste my example into their lesson and pass to the next one, which is what the problem was with my response to another poster.

Don’t get me wrong, I’m not trying to be snarky, I just am genuinely confused, because I took the advice I got on my other response and applied it here, and then got told the same thing. So I think I’m just not understanding something somewhere along the line.

Your answer is great and the example you provided is good, thanks!

My response was to another person, “coder ji”. You can see I’ve edited their post with “removed”

awesome hint…much apprecieted

1 Like

This is the code, you must refer to the previous step :

.flavor {text-align:left}