Tables have a bad reputation because they were once used to lay out entire web pages. Used for what they were designed for, which is presenting data that genuinely has rows and columns, they are the right tool: clear to read, easy for browsers to handle and understandable to assistive technology. The skill is knowing how to structure a table so its meaning is as clear as its appearance.
This module starts with the basic building blocks:
table, tr, th and td. It then covers the elements that give a
table real structure: caption, thead, tbody and
tfoot. Next you'll learn to
merge cells with colspan and
rowspan for more complex layouts of data, and finish
with accessibility, including how the
scope attribute helps screen readers connect data
cells to their headers.
Watch the lessons in order, then continue on to Forms & Inputs.
A quick tutorial on building clean, semantic tables from scratch to display structured data, without relying on messy layout hacks.
Explores how to give tables a solid structure using the semantic elements caption, thead, tbody and tfoot.
Shows how to merge table cells using the colspan and rowspan attributes to build more complex table layouts.
Looks at how screen readers handle tables and how the scope attribute can help them read your data correctly.