Do You Need Tbody?

Do You Need Tbody?

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."

Why is Tbody needed?

The <tbody> element, along with its cousins <thead> and <tfoot> , provide useful semantic information that can be used when rendering for either screen or printer as well as for accessibility purposes. None. Zero or more <tr> elements.

Do you need tbody and thead?

They are not required by the standard. To your question, the answer is "no, they are not necessary". By label a table row with <thead> , <tfoot> , <tbody> , you are grouping them without using ID or class.

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.