Specifies a header cell in a table.
The th element must be placed within a thead or tr element. For more information, please see the page for the table element.
<table border="1px">
<thead>
<tr>
<th>Fruit</th>
<th>Cost per kilo</th>
</tr>
</thead>
<tbody>
<tr>
<td>Apple</td>
<td>$5</td>
</tr>
<tr>
<td>Pear</td>
<td>$10.50</td>
</tr>
<tr>
<td>Peach</td>
<td>$23.30</td>
</tr>
</tbody>
</table>
Fruit | Cost per kilo |
---|---|
Apple | $5 |
Pear | $10.50 |
Peach | $23.30 |