9.2. Mark up the row and column header cells with <th>

In all data tables, mark up each column and row header cell with the <th> tag.

When a cell is essential to understand the data provided in the table, it must be marked up with <th>.

<table>
   <caption>Average monthly temperatures of the 3 largest cities in Canada.</caption>
   <tr>
      <td>&nbsp;</td>
      <th>Toronto</th>
      <th>Montreal</th>
      <th>Vancouver</th>
   </tr>
   <tr>
      <th>June</th>
      <td>22°C</td>
      <td>28°C</td>
      <td>26°C</td>
   </tr>
   <tr>
      <th>July</th>
      <td>24°C</td>
      <td>30°C</td>
      <td>28°C</td>
   </tr>
</table>
Average monthly temperatures of the 3 largest cities in Canada.
Toronto Montreal Vancouver
June 22°C 28°C 26°C
July 24°C 30°C 28°C

Comments

Add a comment

All fields are mandatory.

Back to top