Build a Book Catalog Table - Build a Book Catalog Table

Tell us what’s happening:

I am receiving a "you should have one ‘tbody’ element within your ‘table’ element error. I have one and only one.
(this is for the Build a book catalog table)

Your code so far

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Book Catalog</title>
</head>

<body>
  <table>
    <thead>
      <tr>
        <th>Title</th>
        <th>Author</th>
        <th>Genre</th>
        <th>Publication Year</th>
      </tr>
    </thead>
    
    <tbody>
      <tr>
        <td>The Emperor of Gladness</td>
        <td>Vuong Ocean</td>
        <td>Lit and Fiction</td>
        <td>2025</td>
      </tr>
      <tr>
        <td>Wild Dark Shore</td>
        <td>Charlotte McCogney</td>
        <td>Lit and Fiction</td>
        <td>2025</td>
      </tr>
      <tr>
        <td>King of Ashes</td>
        <td>S.A. Cosby</td>
        <td>Mystery and Thriller</td>
        <td>2025</td>
      </tr>
      <tr>
        <td>Sunrise on the Reaping</td>
        <td>Suzanne Collins</td>
        <td>Young Adult</td>
        <td>2025</td>
      </tr>
      <tr>
        <td>Some Book</td>
        <td>Yo Mommma</td>
        <td>why isnt it working</td>
        <td>2025</td>
      </tr>

    </tbody>
    
    <tfooter>
      <tr>
        <td colspan="4">Total Books: 5</td>
      </tr>
    </tfooter>

  </table>
</body>

</html>

Your browser information:

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

Challenge Information:

Build a Book Catalog Table - Build a Book Catalog Table

Welcome to the forum @kev-kback !

Is this a valid HTML element?

Happy coding!

1 Like

Your code already has a tbody element — that requirement is satisfied. The only actual bug is the <tfooter> typo that should be <tfoot>.

If some validator or checker is flagging the tbody, it may be because the invalid <tfooter> tag is confusing the parser into misreading the document structure. Fixing it to <tfoot> should resolve both issues.

1 Like

Thank you this helped. I will make sure to check addition al potential bugs if it is clear that something is off. Appreciate the in-depth description!

Thanks,