The element groups the header rows of a table, typically containing The The groups header rows, and The selector 'table thead th' targets all The 'scope' attribute on cells that describe each column. tag defines a header cell in a table, which is usually bold and centered by default. <table>
<thead>
<tr><th>Name</th><th>Age</th></tr>
</thead>
<tbody>
<tr><td>Alice</td><td>30</td></tr>
<tr><td>Bob</td><td>25</td></tr>
</tbody>
</table>
cells are bold and centered by default, so the top row shows 'Name' and 'Age' as headers. elements inside . inside the specifically. elements inside the of a table. header cell to its related cells for screen readers. elements specifies whether the header applies to a row, column, or group, helping screen readers understand the table structure.
0
0
Table headers in HTML - Practice Problems & Coding Challenges
Challenge - 5 Problems
Table Header Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What is the purpose of the element in an HTML table?
Choose the best description of the element's role in a table.
Attempts:
2 left
💡 Hint
Think about which part of the table usually contains column titles.
✗ Incorrect
📝 Syntax
intermediate1:30remaining
Which HTML snippet correctly defines a table header cell?
Select the option that uses the correct tag for a table header cell.
Attempts:
2 left
💡 Hint
Table header cells use a special tag different from normal cells.
✗ Incorrect
❓ rendering
advanced2:00remaining
What will the browser display for this table snippet?
Given the HTML below, what is the visual output in the browser?
HTML
Attempts:
2 left
💡 Hint
Headers inside usually appear bold and centered.
✗ Incorrect
❓ selector
advanced1:30remaining
Which CSS selector targets only table header cells inside the table header section?
Choose the CSS selector that styles only
Attempts:
2 left
💡 Hint
Think about selecting
✗ Incorrect
❓ accessibility
expert2:00remaining
Which attribute improves accessibility by associating a table header with its data cells?
Select the attribute that links a
Attempts:
2 left
💡 Hint
This attribute defines if the header is for a row, column, or group.
✗ Incorrect