Couldn’t we use a `<tr>` tag rather than the `<tfoot>` tag for the footer instead?


#1

Question

Couldn’t we use a <tr> tag rather than the <tfoot> tag for the footer instead?

Answer

Yes we could use a <tr> tag and omit the <tfoot> tag altogether. While browsers might not complain, it’s important to realize that including the semantic <tfoot> tag improves the accessibility and the user experience of our page.

When our tables have footer information, it is best practice to nest that information within the semantic <tfoot> tag.


FAQ: Learn HTML Tables - Tables - Table Footer