Table Headers and Structure
Semantic table structure improves accessibility and allows for better styling. Learn about thead, tbody, tfoot, and scope attributes.
Table Sections
Table sections:
<thead>- Header rows<tbody>- Body rows (main data)<tfoot>- Footer rows (summaries)
Scope Attribute
The scope attribute:
col- Header for a columnrow- Header for a rowcolgroup- Header for a group of columnsrowgroup- Header for a group of rows
This is essential for screen readers to associate data with headers.
Column Groups
Column groups (<colgroup> and <col>):
- Style entire columns
spanattribute affects multiple columns
Multiple Header Rows
Complex headers use colspan and rowspan (covered in next lesson).
Styling Table Sections
Exercise: Create Structured Table
Create a table with proper semantic structure:
Semantic table structure makes tables accessible and easier to style!
Up next · Lesson 19 of 32
Spanning Rows and Columns
2 min read
18 of 32 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

