Hurry! Try our new Interactive Courses for FREE. 🥳   🚀
  Signup/Sign In

HTML Tbody Tag

In HTML, the <tbody> tag is used to encapsulate a set of table rows which indicates that they comprise to make the body of the table.

  • If a table has <thead> tag in it then <tbody> must come after <thead> tag.

  • The <tbody> is one of the children of <table> tag.

  • Whenever a document gets printed; the <thead> and <tfoot> are used to specify the information that may be the same or at least very similar on every page of a multi-page table, while the <tbody> tag's contents generally will differ from page to page.

  • The <tbody> tag comprises of more than one <tr> tag inside it.

  • CSS is used to style the <tbody> tag.

HTML <tbody> Tag Syntax and Usage

The <tbody> tag requires the start(opening) tag and end(closing) tag.

Following is the syntax for using the <tbody> tag in your HTML code:

<table>
<thead>
..content here
</thead>

<tbody>
...content here
</tbody>
</table>

HTML <tbody> Tag Basic Example

Below we have a basic example showing how we use the HTML <tbody> tag.

HTML <tbody> tag Attributes

This element supports Global and Event attributes.

Default CSS Settings for HTML <tbody> Tag

Given below are the default CSS settings used by most browsers.

tbody {
  display: table-row-group;
  vertical-align: middle;
  border-color: inherit;
}

Browser Support for HTML <tbody> Tag

Following browsers support this attribute:

  • Google Chrome 6.0+

  • Internet Explorer 9.0+

  • Firefox 4+

  • Opera 11.1+

  • Safari 5.0+