Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

HTMLTableElement.createCaption()

The HTMLTableElement.createCaption() method returns the caption for the table. If no caption element exists on the table, this method creates it, then returns it.

Syntax

HTMLTableElement = table.createCaption()

Example

mycap = mytable.createCaption();

Specification

Document Tags and Contributors

 Contributors to this page: teoli, kscarfone, Sheppy, ethertank, RobG, Dria, JesseW
 Last updated by: teoli,