The <caption> tag is used for creating table captions. The display position of the title for the table is specified by the align attribute. If align = "top" is specified, align = "bottom" at the top of the table will be centered at the bottom of the table. If nothing is specified with the align attribute, it is centered at the top of the table and displayed.

Example Code:
<table border="1">
  <caption>Monthly savings</caption>
Monthly savings
Month Savings
January $100
Attribute Definition

Specifies the alignment of the caption.
Possible Values:

  • left
  • right
  • top
  • bottom
Global Attributes:

The <caption> tag also supports the Global Attributes in HTML5

Event Attributes:

The <caption> tag also supports the Event Attributes in HTML5

Last updated on 2 August 2018 By Rene Spronk

View All HTML Tags

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.