103
HTML <caption> tag
HTML <caption> tag is used to add a caption or title of an HTML table. It should be used inside the <table> element and just after the <table> start tag. A table may contain only one <caption> element.
Syntax
Following are some specifications about the <caption> tag
Display | Inline |
Start tag/End tag | Both start and End tag |
Usage | textual |
Example 1
Output:
Attribute
Tag-specific Attributes
Attribute | Value | Description |
---|---|---|
align |
| It aligns the caption with respect to table |
Global Attributes
The <caption> tag supports the Global attributes
Event Attributes
The <caption> tag supports the event attributes.
Supporting Browsers
Element | Chrome | IE | Firefox | Opera | Safari |
<caption> | Yes | Yes | Yes | Yes | Yes |
Next TopicHTML Center Tag