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


Jaime Rios
Jaime Rios
Courses Plus Student 21,100 Points

Why is it important? Why should I consider telling the browser wich are the header cells?

I have seen the video twice, but may be I'm just missing something.

2 Answers

Andrew McCormick
Andrew McCormick
17,730 Points

You didn't link to the video so I'm not sure which video you are viewing, but how are you going to style the header cells separately from your data cells, or freeze the header cells so that they don't scroll up, etc if you don't tell the browser which are the header cells. (yes, you could probably user 1st-of-type, but that's extra).

Also, if you are using any type of css framework, there's probably pre-built styles expecting you to use the thead element.

Firstly, it doesn't affect the table in any way, it's just another tag which helps search engines and screen readers, so they know about the header section that is not a ordinary section like the body section and they might treat it differently.

I hope that it helps