Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Tables Structuring Tables Add the Table Footer Element

Ricard Taujenis
Ricard Taujenis
4,383 Points

Dose not accept my tfoot placement at the equation

Is it the placement that i have done incorrectly ?

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>HTML Tables</title>
  </head>
  <body>

    <table>
      <tfoot>
      <thead>
        <tr>
          <th scope="col">Name</th>
          <th scope="col">Job</th>
        </tr>
      </thead>
        </tfoot>
      <tbody>
        <tr>
          <td>Nick</td>
          <td>Designer</td>
        </tr>
        <tr>
          <td>Andrew</td>
          <td>Developer</td>
        </tr>
        <tr>
          <td>Dave</td>
          <td>Developer</td>
        </tr>Data is updated every 15 minutes
      </tbody>
    </table>

  </body>
</html>

2 Answers

Hi Ricard,

Yes, your placement is a bit off. The structure of these elements should go:

  1. table header
  2. table body
  3. table footer

At the moment, you have the table header inside the table footer.

So, try a structure like this (and then add the relevant table row and table cell inside, like the task asks):

<thead>
...some stuff
</thead>
<tbody>
...some stuff
</tbody>
<tfoot>
...some stuff
</tfoot>

Hope that helps,

Ede

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi Ricard,

Yes, placement is very important as HTML is rendered top to bottom. Just like in a webpage, the footer would go after the body of the page, in a table, the table footer will come after the table body. So, your code needs to come after the closing tbody tag.

</tbody>
      <tfoot>
        <tr>
          <td>Data is updated every 15 minutes.</td>
        </tr>
      </tfoot>
    </table>