English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The td height attribute specifies the height of the cell. Usually, the cell takes up the space required for its display content. The height attribute is used to set the predefined height of the cell.
Two table cells with predefined heights:
<table border="1"> <tr> <th>Programming Language Books</th> <th>Price</th> </tr> <tr> <td height="80">PHP Basics Tutorial</td> <td height="80">$50</td> </tr> <tr> <td>Java Programming: Thinking in Java</td> <td>$80</td> </tr> </table>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the height attribute.
HTML5 The <td> height attribute is not supported. Please use CSS instead.
In HTML 4.01 In this document, the <td> height attribute is deprecated.
The height attribute specifies the height of the cell.
By default, cells will take up the space required by their display content. The height attribute is used to set a predefined height for the cell.
In HTML 4.01 In this document, the <td> height attribute is deprecated. Please use CSS instead.
CSS Syntax: <td style="height:100px">
CSS Example: Setting the height of table cells
In our CSS tutorial, you can find more about height Attribute . Details.
<td height="pixels|%">
Value | Description |
---|---|
pixels | Set the height value in pixels (e.g., height="50"). |
% | Set the height value as a percentage of the element (e.g., height="50%"). |