HTML <td> Tag code example
Example 1: html create a table
<html>
<head>
<title>Working with HTML Tables</title>
</head>
<body>
<table> <!-- create an table object -->
<tr> <!-- "tr" represents a row -->
<th>Name</th> <!-- use "th" to indicate header row -->
<th>Date of Birth</th>
<th>Weight</th>
</tr>
<tr> <!-- once again use tr for another row -->
<td>Mary</td> <!-- use "td" henceforth for normal rows -->
<td>12/13/1994</td>
<td>130</td>
</tr>
</table>
</body>
</html>
Example 2: html td tag
<table>
<tr>
<th>Column 1 Heading</th>
<th>Column 2 Heading</th>
</tr>
<tr>
<td>Data in Column 1, Row 2</td>
<td>Data in Column 2, Row 2</td>
</tr>
<tr>
<td>Data in Column 1, Row 3</td>
<td>Data in Column 2, Row 3</td>
</tr>
<tr>
<td>Data in Column 1, Row 4</td>
<td>Data in Column 2, Row 4</td>
</tr>
</table>