HTML tbody tag

HTML <tbody> tag defines body section of the table. It groups all the rows present in the body section of the table.

Example

Month Expenses
January $30000
Febuary $40000
March $25000
Total $95000
Try </>

Here, the background-color of the tbody is gray. Its purpose is to distinguish it from thead and tfoot sections.

You can see the real basic structure of data is present in the tbody section.

Related tags

TagsDescription
<table> table tag represents data in the form of rows and columns.
<table> <tr> row is present here </tr> </table>
<thead> thead tag defines heading section at the top of the table.
<table> <thead> heading section of the table is present here </thead> </table>
<tfoot> tfoot tag represents footer section at the bottom of the table.
<table> <tfoot> table footer is present here </tfoot> </table>

Tag omission

Both tags may be omitted.

Global Attributes

All the global attributes are applicable on the tbody element.



Was this article helpful?

 

Email:

Message:

Get the newsletter