Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Table caption property

Table caption property

Table Object Reference Table object


Definition and Usage

The caption property returns the caption element of a table.

The caption element defines the title of a table.

Note: The element defines a table caption. The tag must immediately follow

Syntax

tableObject.caption


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the caption property


Example

Example

The following example returns the table's

tag. Each table can specify only one caption. Usually, the caption is positioned centered above the table.
element's text:

Runoob Tutorial(runoob.com)

    

        

        

    

        

        

cell 1 cell 2
cell 3 cell 4

Try it »


Table Object Reference Table object