Table with a caption
Description:
How to create table with a caption in an html page.
Code:
<html>
<body>
<table border="10">
<caption>Table 1</caption>
<tr>
<td>cell 1</td>
<td>cell 2</td>
<td>cell 3</td>
</tr>
<tr>
<td>cell 4</td>
<td>cell 5</td>
<td>cell 6</td>
</tr>
</table>
</body>
</html>
Play with the code:
See working example:
Explanation:
To stick a label on the table, use the <caption></caption> tag and place it right after the <table> tag.
See Also:
HTML: Html, Body, Table, Tr, Td, Caption
|