Javatpoint Logo
Javatpoint Logo

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

Test it Now

Output:

HTML caption tag

Attribute

Tag-specific Attributes

Attribute Value Description
align
  • top
  • bottom
  • left
  • right
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

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<caption>YesYesYesYesYes
Next TopicHTML Center Tag




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA