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 The Table Head and Body Elements

Are <thead> and <tbody> purely semantic?

Hi friends. Nick mentioned at the end of the video that the table header/body tags are optional, but "nice to have". Does this mean they mainly serve a semantic purpose? Or are there other reasons we might need to include them, i.e. for styling?

1 Answer

Travis Alstrand
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Travis Alstrand
Treehouse Teacher

Nice question nicolaspeterson ! Yes I believe you are correct here, this is a line pulled right from the MDN page for <tbody>

The <tbody> element, along with its related <thead> and <tfoot> elements, provide useful semantic information that can be used when rendering for either screen or printer.

resource