<tbody> Table Body Element - (X)HTML Element Reference :: webDev

<tbody>

Just as you can logically group all the header content in a <table>using <thead>, you can do the same for the main body of the table data using <tbody> (<tbody> is a shortening of table body). By default, a <tbody> will not affect the display of the <table> in any way. However, you may use this element to affect the table’s display via CSS (for example, you may choose to set the height of the tbody area to a fixed amount, and let the content in that area scroll, so that the <table>’s header and footer sections remain visible on screen even when the main bulk of the table content is quite lengthy).

The <tbody> element is used to group the bulk of the <table>’s content (that is, anything other than the headers, which are contained in the <thead>, and the footer area, which is contained by <tfoot>).

By itself—with none of the element-specific attributes applied—the presence of a <tbody> makes no visual difference to the <table>. For a true indication of compatibility issues, refer to each individual attribute to see what works and what fails.

HTML <tbody> Tag

The <tbody> tag is used to group the body content in an HTML <table>.

The <tbody> element should be used in conjunction with the <thead> and <tfoot>elements.

The <thead>element is used to group the header content in an HTML table and the <tfoot> element is used to group the footer content in an HTML <table>.

Notice that these elements will not affect the layout of the <table> by default. However, you can use CSS to let these elements affect the <table>'s layout.

HTML Tag: <tbody>

Table body. Along with <thead> and <tfoot>, <tbody> can be used to group a series of rows. tbody can be used more than once to separate different sections and must be used if <thead> and <tfoot> are used. It must be used within a <table> element and must follow both <thead> and <tfoot> elements when used.

  • Optional <tbody> Attributes
  • align can be used to horizontally align the cells within the element. The value can be left, center, right, justify or char.
  • valign can be used to vertically align the cells within the element. The value can be top, middle, bottom or baseline.
  • char can be used to specify a character with which cells will align, such as a decimal point. It is not supported by any major browser.
  • charoff can be used to specify the number of pixels the alignment should be offset from the char character. It is not supported by any major browser.

<tbody> Table Body (X)HTML Element Reference - (X)HTML webDev