<td>: The HTML Table Data Cell Element
1 Description
The HTML <td>
element is used in
HTML <table>
elements to define
the cells of a table; td is short for 'table data'. <td>
elements are always the direct child of a <tr>
element.
2 Examples
<!DOCTYPE html>
<html>
<head>
<title>Example Page</title>
</head>
<body>
<h1>Example HTML Page</h1>
<p>Below is a table showing the average daily temperature for different American cities.</p>
<table>
<thead>
<tr>
<th>Average Daily Temperature Data for Cities</th>
</tr>
<tr>
<th>City Name</th>
<th>Temperature</th>
</tr>
</thead>
<tbody>
<tr>
<td>Los Angeles</td>
<td>82.0</td>
</tr>
<tr>
<td>Seattle</td>
<td>67.1</td>
</tr>
<tr>
<td>New York</td>
<td>73.2</td>
</tr>
<tr>
<td>Miami</td>
<td>83.9</td>
</tr>
</tbody>
</table>
</body>
</html>
This document was last updated: