Build a Book Catalog Table - Build a Book Catalog Table

Tell us what’s happening:

  1. The td element in your tfoot element’s row should have the text Total Books: [number of books in your table].
    how can i pass that?

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>a</td>
    <td>b</td>
    <td>c</td>
    <td>d</td>
  </tr>
   <tr>
     <td>aa</td>
     <td>ba</td>
     <td>ca</td>
     <td>da</td>
   </tr>
    <tr>
      <td>ab</td>
      <td>bb</td>
      <td>cb</td>
      <td>db</td>
    </tr>
     <tr>
       <td>ac</td>
       <td>bc</td>
       <td>cc</td>
       <td>dc</td>
     </tr>
      <tr>
        <td>ad</td>
        <td>bd</td>
        <td>cd</td>
        <td>dd</td>
      </tr>
  </tbody>
  <tfoot>
    <tr>
      <td colspan="4">Total Books: [number of books in your table]</td>
      <td>5</td>
    </tr>
    </tfoot>
  </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/132.0.0.0 Safari/537.36

Challenge Information:

Build a Book Catalog Table - Build a Book Catalog Table

You may want to reread the userstory

  1. The row in your table footer element should have a table data element that spans four columns and has the text Total Books: N where N should be replaced by the number of books in your table.

you should not have the text [number of books in your table] there

1 Like

tried it but did not get it?

what have you written?

<td colspan="4">Total Books:</td>

why do you think that is the correct text? aren’t you missing something?

1 Like

Tried it with Total Books:N but still not working

The row in your table footer element should have a table data element that spans four columns and has the text Total Books: N where N should be replaced by the number of books in your table.

It should look like

Total Books: 25

or

Total Books: 2

But the number, instead of 25 or 2 should be the number of books in your table.

2 Likes