Recall & Review
beginner
What HTML tag is used to define a table header cell?
The
<th> tag is used to define a table header cell in HTML. It makes the cell content bold and centered by default.Click to reveal answer
beginner
How do table headers improve accessibility?
Table headers help screen readers understand the structure of the table by labeling rows or columns. This makes it easier for users with disabilities to navigate and understand the data.
Click to reveal answer
intermediate
What attribute connects a table data cell to a header cell for accessibility?
The
headers attribute on a <td> cell links it to one or more <th> cells by their id. This helps assistive technologies relate data cells to their headers.Click to reveal answer
beginner
What is the difference between
<th> and <td> tags?<th> defines a header cell, usually bold and centered, while <td> defines a regular data cell in a table.Click to reveal answer
intermediate
How can you specify that a
<th> is a header for a row or a column?Use the
scope attribute on <th>. Set it to col for column headers or row for row headers. This helps screen readers understand the header's role.Click to reveal answer
Which tag is used to create a header cell in an HTML table?
✗ Incorrect
The <th> tag defines a header cell in an HTML table.
What attribute should you add to a <th> to specify it is a column header?
✗ Incorrect
The scope="col" attribute on <th> specifies it is a column header.
Why are table headers important for accessibility?
✗ Incorrect
Table headers help screen readers understand the table's rows and columns.
Which attribute links a data cell to its header cell?
✗ Incorrect
The headers attribute on <td> links it to one or more <th> cells by their ids.
What is the default style of a <th> cell in most browsers?
✗ Incorrect
By default, <th> cells are bold and centered.
Explain how to create accessible table headers in HTML and why they matter.
Think about how screen readers read tables and how headers help.
You got /4 concepts.
Describe the difference between and tags and their roles in a table.
Consider how headers label rows or columns.
You got /4 concepts.