Artboard 16light, inspiration, solution, idea, innovation,ionicons-v5_logosGoogle Sheets iconSwift icon
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 that one before!

Stefan Judis avatar
Stefan Judis @stefanjudis
TIL there's a `headers` HTML attribute that you can to make cells spanning across columns more accessible. 😲

Read more on @aardrian's blog. 👇

adrianroselli.com/2017/11/hey-it… A graphic showing how a cell is connected to two header cells using the `headers` attribute.
31 retweets 114 likes Tweeted Open Tweet

I rarely use tables because I usually don't deal with tabular data. But suppose you're building complex tables with cells spanning multiple columns or rows. In that case, you can use headers to define which table header elements are connected to the particular table cell.

Here are some resources to read more about it:

Was this TIL post helpful?
Yes? Cool! You might want to check out Web Weekly for more quick learnings. The last edition went out 3 days ago.

Related Topics

Related Articles