HTML Table

HTML table is defined with the <table> tag. It is used to manage the layout of the page e.g. header, body content, footer etc. HTML <table> tag is used to display data in tabular form. There can be many columns in a row. Each table row is defined with the <tr> tag. A table header is defined with the <th> tag. By default, table headings are bold and centered. A table data/cell is defined with the <td> tag.

See this example:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example of HTML Table</title>
</head>
<body>
   <table border="1">
	<thead>
		<tr>
			<th>No.</th>
			<th>Name</th>
			<th>Email</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>1</td>
			<td>Saarthak</td>
			<td>saarthak@example.com</td>
		</tr>
		<tr>
			<td>2</td>
			<td>Vijay</td>
			<td>vijay@example.com</td>
		</tr>
	</tbody>
</table>
 </body>
</html>