HTMLTableElement.createTFoot()

The HTMLTableElement.createTFoot() method returns the <tfoot> element associated with a given <table>. If no footer exists in the table, this methods creates it, and then returns it.

Note: If no footer exists, createTFoot() inserts a new footer directly into the table. The footer does not need to be added separately as would be the case if Document.createElement() had been used to create the new <tfoot> element.

Syntax

HTMLTableSectionElement = table.createTFoot();

Return value

HTMLTableSectionElement

Example

let myfoot = mytable.createTFoot();
// Now this should be true: myfoot == mytable.tFoot

Specifications

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

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
createTFootChrome 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 ?

Legend

Full support
Full support
Compatibility unknown
Compatibility unknown