HTML <td> heightAttribute
Examples
Two table cells with predefined heights:
<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td height="100">January</td>
<td height="100">$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td height="100">January</td>
<td height="100">$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the height attribute.
Definition and Usage
HTML5 does not support the <td> height attribute. Please use CSS instead.
In HTML 4.01, the height attribute of <td>is deprecated.。
The height attribute specifies the height of a cell.
Normally, a cell takes up the space it needs to display its content. The height attribute is used to set a predefined height for the cell.
Compatibility Notes
In HTML 4.01, the height attribute of <td> is deprecated. Please use CSS instead.
CSS syntax: <td style="height:100px">
CSS Example: Set the height of a table cell
In our CSS tutorial, you can find more details aboutthe height attribute.
Syntax
<td height="pixels|%">
Attribute Values
| Value | Description |
|---|---|
| pixels | Sets the height value in pixels (for example, height="50"). |
| % | Sets the height value as a percentage of the containing element (for example, height="50%"). |
HTML <td> Tag Other Extensions