HTML caption Tag

HTML <caption> Tag: The HTML<caption> tag specifies the table caption. This HTML caption tag must be inserted after the <table> tag. By using the <caption> tag you can specify only one caption per table. By default, the caption is placed at the center of the table. Using CSS you can change the alignment.

HTML <caption> Tag

The HTML <caption> tag supports both the global and the event attributes. The <caption> tag must be included instantly after the <table> tag.

Syntax: <caption> Text </caption>

Browser compatibility

The HTML<caption> tag is supported by different browsers.

  • Chrome
  • Firefox,
  • Opera,
  • Safari
  • InternetExplorer


<!DOCTYPE html>
table, th, td {
  border: 1px solid black;
  <caption>Programming Languages & their Inventors</caption>
    <th>Dennis Ritche</th>
    <td>James Gosling</td>
    <td>Guido van Rossum</td>


html caption tag


Attributes that are supported by the <caption> tag

Attribute Value Description
align left
Describes the alignment of the caption