What does colspan="3" mean when applied to a table cell?
- The cell occupies three rows.
- The cell occupies three columns.
- The table contains three header rows.
- The cell is hidden on three devices.
Question 6: rowspan
What does rowspan="2" mean when applied to a table cell?
- The cell occupies two columns.
- The cell occupies two rows.
- The cell contains two values.
- The table has two captions.
Question 7: True or False
The headers attribute can reference the IDs of header cells associated with a data cell.
- True
- False
Question 8: Column Groups
Which elements are used to group columns and identify columns within a group?
- thead and tbody
- tr and td
- colgroup and col
- dl and dt
Question 9: Accessibility
Which is the best approach for a complex table with multiple levels of headers?
- Use only td elements and rely on bold text.
- Remove all captions and headings.
- Use meaningful header cells and explicit header associations when needed.
- Use a table only for page layout.
Question 10: Responsive Tables
What is a common way to make a wide data table usable on narrow screens?
- Remove all table rows.
- Place the table inside a container that allows horizontal scrolling when needed.
- Replace every cell with a heading.
- Use rowspan on every cell.
19. Quiz Answer Key and Explanations
Review the correct answers and explanations below. Understanding why an answer is correct is more valuable than memorizing the letter.
Answer 1: B — tr
The tr element represents a table row. It contains table header cells or data cells. The td and th elements represent individual cells, while tbody groups body rows.
Answer 2: B — To identify or describe the table
The caption element provides a title or description that helps users understand the table's purpose. It is particularly useful when a page contains multiple data tables.