Which HTML element defines a table row?

The story behind the answer

The HTML element that defines a table row is tr. It acts as a container for the cells in one horizontal row of an HTML table, including both ordinary data cells and header cells.

A basic table commonly uses a table element around one or more tr elements, with td for data cells and th for header cells. For example, a row might contain <tr><td>Paris</td><td>France</td></tr>. The browser uses the row structure to organize cells into columns and render the table.

A frequent mix-up is choosing table, td, or th. The table element defines the table as a whole. The td element represents an individual data cell, while th represents an individual header cell. Neither cell element defines an entire row. Rows can also contain cells that span several columns or rows using colspan and rowspan.

Semantic table structure matters for accessibility. Header cells, especially when paired with appropriate scope information, help screen readers associate labels with the data they describe. Tables should represent genuinely tabular relationships, not merely provide page layout.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: