Table caption tag is used as a title or head details for the table. Note: This tag is deprecated in newer version of HTML/XHTML.
Example
<!DOCTYPE html>
<html>
<head>
<title>HTML Table Caption</title>
</head>
<body>
<table border="1" width="100 %">
<caption>Scholars Globe caption</caption>
<tr>
<td>row 1, column 1</td>
<td>row 1, column 2</td>
</tr>
<tr>
<td>row 2, column 1</td>
<td>row 2, column 2</td>
</tr>
</table>
</body>
</html>
See Result:
Scholars
Globe caption
row 1, column 1
|
row 1, column 2
|
row 2, column 1
|
row 2, column 2
|
No comments:
Post a comment