Pr.Pg Next Pg

<CAPTION> . </CAPTION> tag tutorials

  • This is a paired tag. It requires opening and closing tags.

  • This tag is used within <TABLE> tags, but not inside table Rows or Columns. It is used to describe the Caption or Description for a table. It has following attributes.

  • Attributes of Caption tag are below:

ALIGN = LEFT / CENTER / RIGHT

VALIGN = TOP / BOTTOM

 

Sr No

Attributes

Descriptions

1

ALIGN

This attribute of <CAPTION> tag element specify where caption text to be aligned horizontally. You can set it to LEFT / CENTER or RIGHT.

2

VALIGN

This attribute of <CAPTION> tag element specify where caption text to be placed vertically at Top or at Bottom.

 

Syntax:

<body>

<table>

<caption>text

</caption>

</table>

</body>

 

Example: HTML program to demonstrate caption tag

Output:
Pr.Pg border                                              Next Pg