Skip to main content

HTML Guide

“th” start tag in table body.

The <th> HTML element defines a cell as a header of a group of table cells, and must appear within a <tr> element.

In the following example for a simple table, the first <tr> contains two <th> header cells naming the values for each column:

<table>
  <tr>
    <th>Name</th>
    <th>Age</th>
  </tr>
  <tr>
    <td>Liza</td>
    <td>49</td>
  <tr>
  <tr>
    <td>Joe</td>
    <td>47</td>
  </tr>
</table>

Learn more:

Related W3C validator issues