Web/API/HTMLTableElement/tBodies

From Get docs


The HTMLTableElement.tBodies read-only property returns a live HTMLCollection of the bodies in a <table>.

Although the property is read-only, the returned object is live and allows the modification of its content.

The collection returned includes implicit <tbody> elements. For example:

<table>
  <tr>
    <td>cell one</td>
  </tr>
</table>

The HTML DOM generated from the above HTML will have a <tbody> element even though the tags are not included in the source HTML.

Syntax

HTMLCollectionObject = table.tBodies

Example

This snippet gets the number of bodies in a table.

mytable.tBodies.length;

Specifications

Specification Status Comment
HTML Living StandardThe definition of 'HTMLTableElement: tBodies' in that specification. Living Standard

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
tBodies Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE

Full support Yes

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

?

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown


See also