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
Franklin Gomez
6,549 Pointswhy should the <tfoot> be align between <thead> and <tbody> rather then at the bottom after the <tbody>?
<body>
<table>
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Job role</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="3">Data is updated every 15 minutes.</td>
</tr>
</tfoot>
<tbody>
<tr>
<th scope="row">Franklin Gomez</th>
<td>gomezpr@gmail.com</td>
<td>Web Designer</td>
</tr>
<tr>
<th scope="row">Andrew Balck</th>
<td>andre@example.com</td>
<td>Front-End Developer</td>
</tr>
<tr>
<th scope="row">Dave McFarland</th>
<td>dave@example.com</td>
<td>Front-End Developer</td>
</tr>
<tr>
<th scope="row">Guild Hernandez</th>
<td>guil@example.com</td>
<td>Web Designer</td>
</tr>
</tbody>
</table>
</body> </html>
I am confuse about why <tfoot> goes there rather then at the very bottom after the body.
2 Answers
Per Karlsson
12,683 PointsHey Franklin,
The <tfoot> has to be defined first so that it can be rendered before the body, which will likely hold a lot of data.
You can read more about it here
Regards, Per
Franklin Gomez
6,549 PointsThank you Per, very helpful information.