← Back to HTML
12

HTML Tables: Structured and Accessible Data

Build tables that are easier to read and easier to navigate by using `caption`, `thead`, `tbody`, `th` and `scope` with clear intent.

📘 Theory

A Table Structure That Actually Helps

Think in terms of data relationships, not just rows and borders.

1

`caption` gives the table a shared context. `thead` separates headers from body rows. `th` marks header cells, and `scope` clarifies whether a header belongs to a row or a column.

2

These small decisions matter a lot when tables become larger or more complex.

Common Table Mistakes

Avoid these and your tables already become much easier to trust.

  • Using `td` where a real header cell should be `th`.
  • Skipping `caption` in tables that need shared context.
  • Using tables to arrange layout instead of data.
  • Creating rows with confusing or inconsistent column structure.

🧪 Learn by doing

Example Guided Example: Small Pricing Table Review caption, header structure and row headers together.

🏁 Challenges

Challenge Challenge: Improve the Header Accessibility Add missing column scope attributes to the header row.

🧰 Resources

Test

Check your knowledge with a test about HTML.

Test for HTML

What is this?

I'm Cristian Eslava and I sometimes build websites so both you and I can learn and experiment. culTest

I made this in February 2026 to make learning easier for my students. The idea is to learn web development by practicing and to keep expanding the project with new topics, tests and challenges.

It draws inspiration from MDN, W3Schools, CodePen, Manz and many other web development references. I wanted to combine useful theory, runnable examples, challenges and the testing system I had already built for culTest. culTest

If you liked it, if you didn't, or if you want to get in touch, write to me at cristianeslava@gmail.com