Published at
Updated at
Reading time
1min
This post is part of my Today I learned series in which I share all my web development learnings.

I love that even after writing HTML for such a long time, there's always something new to discover. #htmlIsNotEasy

Today I learned that HTML table cells support a headers attribute. I haven't seen this one before!

TIL there's a `headers` HTML attribute that you can to make cells spanning across columns more accessible. ๐Ÿ˜ฒ  Read more on @aardrian 's blog. ๐Ÿ‘‡

I rarely use tables because I don't deal with tabular data. But suppose you're building complex tables with cells spanning multiple columns or rows. Then, you can use headers to define what table headers (th) are connected to the following table cells (td).

Here are some resources to read more about it:

If you enjoyed this article...

Join 5.5k readers and learn something new every week with Web Weekly.

Web Weekly โ€” Your friendly Web Dev newsletter
Reply to this post and share your thoughts via good old email.
Stefan standing in the park in front of a green background

About Stefan Judis

Frontend nerd with over ten years of experience, freelance dev, "Today I Learned" blogger, conference speaker, and Open Source maintainer.

Related Topics

Related Articles