programming-examples/html/Basics/Specify the table caption.html

40 lines
968 B
HTML
Raw Permalink Normal View History

2019-11-18 14:44:36 +01:00
<!DOCTYPE html>
<html subLang="en">
<head>
<title>Example of HTML caption Tag</title>
<style type="text/css">
table, td, th {
border: 1px solid gray;
}
</style>
</head>
<body>
<table>
<caption>User Details</caption>
<thead>
<tr>
<th>No.</th>
<th>Name</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>John Carter</td>
<td>johncarter@mail.com</td>
</tr>
<tr>
<td>2</td>
<td>Peter Parker</td>
<td>peterparker@mail.com</td>
</tr>
<tr>
<td>3</td>
<td>John Rambo</td>
<td>johnrambo@mail.com</td>
</tr>
</tbody>
</table>
</body>
</html>