Add a Caption to a Table
Description
The caption
element lets you define a
caption and associate it with a table
element.
The align
attribute is obsolete.
Example
The following code shows the caption
element in use.
<!DOCTYPE HTML>
<html>
<head>
</head><!-- w w w .j ava2 s .c om-->
<body>
<table>
<caption>Results of the Survey</caption>
<tbody>
<tr>
<th>Favorite:</th>
<td>500</td>
</tr>
</tbody>
</table>
</body>
</html>
A table can contain only one caption
element, but it doesn't
have to be the first element contained in the table.