HTML tables contain two types of table cells:
- header cells — For headers that appear over a column of data:
Header cells are defined with the <th> and </th> tags. In a simple table, headers comprise the first row. For example, if your table has three columns of data, and three rows, the HTML for the table looks like:
<table> <tr> <!-- Row 1 --> <th> Header 1 </th> <th> Header 2 </th> <th> Header 3</th> </tr> <tr> ... </tr><!-- Row 2 --> <tr> ... </tr> <!-- Row 3 --> </table>
- data cells — For the individual entries in the table:
Data cells are defined by <td> and </td> tags. These cells usually make up the bulk of the table. Let's add the data cells to our basic table:
<table>
<tr> <!-- Row 1 -->
<th> Header 1 </th>
<th> Header 2 </th>
th> Header 3</th>
</tr>
<tr><!-- Row 2 -->
<td> Data 1 </td>
<td> Data 2 </td>
<td> Data 3 </td>
</tr>
<tr><!-- Row 3 -->
<td> Data 1 </td>
<td> Data 2 </td>
<td> Data 3 </td>
</tr>
</table>
This is how this table is displayed in a browser:
In default templates, typically header cells contain the field names, and data cells contain PowerMill variables.