Skip to content

Courses / HTML5 Mastery: Complete Beginner to Advanced Course / HTML Tables

664 people viewed this

HTML Tables

What does colspan="3" mean when applied to a table cell?

  1. The cell occupies three rows.
  2. The cell occupies three columns.
  3. The table contains three header rows.
  4. The cell is hidden on three devices.

Question 6: rowspan

What does rowspan="2" mean when applied to a table cell?

  1. The cell occupies two columns.
  2. The cell occupies two rows.
  3. The cell contains two values.
  4. 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.

  1. True
  2. False

Question 8: Column Groups

Which elements are used to group columns and identify columns within a group?

  1. thead and tbody
  2. tr and td
  3. colgroup and col
  4. dl and dt

Question 9: Accessibility

Which is the best approach for a complex table with multiple levels of headers?

  1. Use only td elements and rely on bold text.
  2. Remove all captions and headings.
  3. Use meaningful header cells and explicit header associations when needed.
  4. 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?

  1. Remove all table rows.
  2. Place the table inside a container that allows horizontal scrolling when needed.
  3. Replace every cell with a heading.
  4. 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.

Answer 3: C — tbody

Rate this course

5.0 · 1 rating

Stars show on this course. Your written note stays private.

Your stars