Sectioning off the table headings doesn’t appear to change anything. Why does it “make sense to section off the table headings”?


#1

Question

Sectioning off the table headings doesn’t appear to change anything. Why does it “make sense to section off the table headings”?

Answer

While the <thead>, <tbody>, and <tfoot> (next exercise) tags may not affect the appearance of tables, they do create semantic meaning which can improve the user experience in a number of ways. For instance, with just a bit of CSS the <thead> tag allows developers to more readily target table headings and style them such that this information can be seen while scrolling through long tables.

What’s more, these semantic tags allow software like screen readers and search engines to make better sense of our table content.


FAQ: Learn HTML Tables - Tables - Table Head