CAPTION will create a line of text (centered) above or below the table. The text appears "outside" of the table borders. Caption is usually used as a title or header.
Caption has only one property,
ALIGN, that can be set to
TOP or
BOTTOM. The caption tag set is
always placed directly after the opening TABLE tag and before the first TR tag.
<table border="1" width="100%">
<caption align="top">
My Table Title
</caption>
<tr>
<th width="50%" align="right">
Text1.
</th>
<td width="50%">
Text2.
</td>
</tr>
</table>
|
|
My Table Title
|
Text1.
|
Text2.
|
|