Styling your tables
<th> Table heading. So the code will look like this:
Table heading
<table>
<tr>
<th scope="col"></th>
<td></td>
</tr>
<tr>
<th scope="row"></th>
<td></td>
</tr>
</table>
<th> can be your horizontal heading or your vertical heading. By default, <th> style is bold. You can also declare your own styles for <th>.
The <th> element is used just like the <td> element but its purpose is to represent the heading for either a column or a row.
Even the cell has no content, you should still use a <td> or <th> to represent the presence of an empty cell, otherwise the table will not render correctly.
Long table.
<table>
<thead></thead>
<tbody></tbody>
<tfoot></tfoot>
</table>
These three elements can help users who use screen readers and also allow you to style these sections in a different manner than the rest of the table.
Table heading
<table>
<tr>
<th scope="col"></th>
<td></td>
</tr>
<tr>
<th scope="row"></th>
<td></td>
</tr>
</table>
<th> can be your horizontal heading or your vertical heading. By default, <th> style is bold. You can also declare your own styles for <th>.
The <th> element is used just like the <td> element but its purpose is to represent the heading for either a column or a row.
Even the cell has no content, you should still use a <td> or <th> to represent the presence of an empty cell, otherwise the table will not render correctly.
Long table.
<table>
<thead></thead>
<tbody></tbody>
<tfoot></tfoot>
</table>
These three elements can help users who use screen readers and also allow you to style these sections in a different manner than the rest of the table.