Search This Blog

CSS Table With Caption Example

CSS Table With Caption Example :
<!DOCTYPE html>
<html>
<head>
<title> kod4u </title>
<style type="text/css">
table, th, td {
border: 2px solid;
}

caption {
caption-side:bottom;
}
</style>
</head>
<body>
<h1> Table With Caption Example </h1>
<p> Here we give caption in table and we also select the way to display caption like top, bottom </p>

<table>
<caption> Table 11.3 Students </caption>
<tr>
<th> Firstname </th>
<th> Lastname </th>
</tr>
<tr>
<td> Amit </td>
<td> Ankit </td>
</tr>
<tr>
<td> Smith </td>
<td> Singh </td>
</tr>
</table>

</body>
</html>
OUTPUT
CSS Table With Caption Example

No comments:

Post a Comment