Skip to main content

HTML Guide

“td” start tag in table body.

A td element must be placed within a tr (table row) element, not directly as a child of tbody, thead, tfoot, or table.

The td (table cell) element defines a cell of a table that contains data. According to the HTML standard, td elements must be placed inside tr elements, which are used to group table cells in a row. Directly placing a td element inside tbody, thead, tfoot, or table violates the HTML content model and will cause a validation error.

Incorrect example:

<table>
  <tbody>
    <td>Cell 1</td>
    <td>Cell 2</td>
  </tbody>
</table>

Correct example:

<table>
  <tbody>
    <tr>
      <td>Cell 1</td>
      <td>Cell 2</td>
    </tr>
  </tbody>
</table>

Always wrap td elements within a tr when constructing table rows.

Learn more:

Related W3C validator issues