Build a Bookstore Page - Step 19

Tell us what’s happening:

It is telling me that my 2 button elements are wrong even though I have a class and id attribute. I have changed the code so many times I am tired of looking at it. Someone please help me figure out what I did wrong.

Your code so far

<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>XYZ Bookstore Page</title>
</head>

<body>
  <h1>XYZ Bookstore</h1>
  <p>Browse our collection of amazing books!</p>
  
  <div class="card-container">
    <div class="card" id="sally-adventure-book">
      <h2>Sally's SciFi Adventure</h2>
      <p>This is an epic story of Sally and her dog Rex as they navigate through other worlds.</p>
      <button class="btn">Buy Now</button>
    </div>
    
    <div class="card" id="dave-cooking-book">
      <h2>Dave's Cooking Adventure</h2>
      <p>This is the story of Dave as he learns to cook everything from pancakes to pasta, one recipe at a time.</p>
      <button class="btn">Buy Now</button>
    </div>
  </div>
  
  <p>Review your selections and continue to checkout.</p>
  
  <div class="btn-container">

<!-- User Editable Region -->

<button class="btn">View Cart<id="view-cart-btn">
</button>
<button class="btn">Checkout<id="checkout-btn">
</button>    

<!-- User Editable Region -->

  </div>
</body>

</html>

Your browser information:

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

Challenge Information:

Build a Bookstore Page - Step 19

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/workshop-bookstore-page/68eca6e5a6759ed4ea0034dc.md at main · freeCodeCamp/freeCodeCamp · GitHub

The issue is the incorrect html syntax used.

I suggest reviewing how to create a button element. Then also reviewing how to add an attribute to an element as id is an attribute.

In your code, you are treating id like an element, not an attribute.

Hello,

The issues is the incorrect way of placing an id attribute. Here’s an example:

<element attribute="value"></element>

Remember that attributes should always be placed in the opening tag and NOT the closing tag.

Alright, thank you so much. I figured it out.