HTML caption tag

<caption> tag defines the title or detail of the table. This tag participates in making the model of table. It also provides the table number and the context of the table.

Example

Table 1.

Multiplication table

1 2 3
1 1 2 3
2 2 4 6
3 3 6 9
Try </>

Specific Uses

It defines a title or context of the table.

Related tags

The specific attributes of the caption element have been given below.

TagsDescription
<table> table element represents the data in 2-D form.
<table> Table Data in the form of rows and columns </table>
<tr> tr element defines a row in a table.
<table><tr> Table row </tr></table>
<td> td element defines a cell of data in a table.
<table><tr><td> A cell of data </td></tr></table>

Tag omission

Both opening and closing tags are necessary for the caption element.

Global Attributes

All the global attributes are applicable on the caption element.



Was this article helpful?

 

Email:

Message:

Get the newsletter