HTML5 <tbody> Tag

The HTML <tbody> tag is used to group one or more <tr> elements as the body of a <table> element.

The only content permitted inside this element is zero or more <tr> elements. The <tbody> element is not a required child element for a parent <table> element to graphically render. However, it must not be present, if its parent <table> element has a <tr> element as a child.

The parent of the <tbody> tag can only be <table> element. The <tbody> element can be added after a <caption>, <colgroup>, <thead> and a <tfoot> element.

In conjunction with a preceding <thead> and/or <tfoot> element, the <tbody> element provides additional semantic information for devices such as printers and displays.

Of the parent table’s child elements, <tbody> represents the content which, when longer than a page, will most likely differ for each page printed; while the content of <thead> and <tfoot> will be the same or similar for each page printed.

Unlike the <thead>, <tfoot>, and <caption> elements, multiple <tbody> elements are permitted (if consecutive), allowing the rows in long tables to be divided into different sections, each separately formatted as needed.

The following style is applied to this element by default:

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


This element only accepts global attributes.

Reader Comments

1. You can register or login to post a comment. Asking readers to register improves the quality of discussion.

2. As a registered user, you will also get to access features like choosing between a light and dark theme or anything else that we might implement in future.

Follow Us For Updates

Go To Top