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:

    <td>cell one</td>

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


HTMLCollectionObject = table.tBodies


This snippet gets the number of bodies in a table.



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

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
tBodiesChrome Full support YesEdge Full support 12Firefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android ? Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?


Full support  
Full support
Compatibility unknown  
Compatibility unknown

See also