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 trialByron Farrell
5,700 PointsWhy does the tfooter come after the rthead?
Hi,
I was curious about this so I found a forum on it: https://teamtreehouse.com/community/why-is-it-that-the-tfoot-should-go-in-between-the-thead-and-tbody. The last comment says that this has been changed with a link to a website. I'm new to html is the website legit and must tfoot be placed after tbody now?
2 Answers
Ross King
20,704 PointsHi Byron,
The reason is so that browsers (user agents) can render the footer before receiving all of the body data. For example, if the body had 10,000 rows, it may take a long time to render.
This is why the footer follows the header. See w3 specification for correct syntax.
Jordan Adedeji
6,977 PointsI think this has changed now. The tfooter now comes after the tbody. Link below: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot
Douglas Carvalho
5,056 PointsI think mozilla website is not following the current w3c recommendations. So far, W3C still says to keep tfoot after thead and before tbody.
Juan Mera
Courses Plus Student 3,527 PointsJuan Mera
Courses Plus Student 3,527 PointsAwesome! It makes sense now.