References

Collection of references for web development.

HTML table tag

Description

The HTML <table> element represents a table that consists of rows and columns.

Example

<table>
	<thead>
		<tr>
			<th>Name</th>
			<th>Gender</th>
			<th>Age</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>David</td>
			<td>Male</td>
			<td>23</td>
		</tr>
		<tr>
			<td>Jessica</td>
			<td>Female</td>
			<td>47</td>
		</tr>
		<tr>
			<td>Warren</td>
			<td>Male</td>
			<td>12</td>
		</tr>
	</tbody>
</table>

Example #2

<style>
table {
    border-collapse: collapse;
}
td,th {
	border:1px solid black;
	padding:5px;
}
thead {
	font-weight:bold;
}
</style>
<table>
	<thead>
		<tr>
			<th>Name</th>
			<th>Gender</th>
			<th>Age</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>David</td>
			<td>Male</td>
			<td>23</td>
		</tr>
		<tr>
			<td>Jessica</td>
			<td>Female</td>
			<td>47</td>
		</tr>
		<tr>
			<td>Warren</td>
			<td>Male</td>
			<td>12</td>
		</tr>
	</tbody>
</table>

More Examples