Alert the text inside a caption element:
The caption property returns the <caption> element of a table.
The <caption> element defines a caption for a table.
Note: The <caption> tag must be inserted immediately after the <table> tag. You can specify only one caption per table. By default, the caption will be centered above the table.
The caption property is supported in all major browsers.
Return Value: | The <caption> element of the table, or null if it is not defined |
---|
HTML reference: HTML <caption> tag