Is it necessary to have <tbody> in every table?
Only if you define thead
and tfoot
. It is mostly used when the table has multiple bodies of content. If the data in the table is easily understood to be the tbody
then you can safely omit it.
Quoting the HTML 4 spec: "The TBODY start tag is always required except when the table contains only one table body and no table head or foot sections. The TBODY end tag may always be safely omitted."
So, you must have a <tbody>
tag if you have a <thead>
or <tfoot>
See also: MDN