English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The td height attribute specifies the height of the cell. Usually, the cell occupies 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 Basic Tutorial</td> <td height="80">$50</td> </tr> <tr> <td>Java Programming Thoughts</td> <td>$80</td> </tr> </table>Test to see ‹/›
IEFirefoxOperaChromeSafari
Tutti i browser mainstream supportano l'attributo height.
HTML5 non supporta l'attributo height di <td>. Usa CSS invece.
In HTML 4.01, l'attributo height di <td> è obsoleto.
L'attributo height specifica l'altezza della cella.
Di solito, le celle occupano lo spazio necessario per il loro contenuto visibile. L'attributo height viene utilizzato per impostare l'altezza predefinita della cella.
In HTML 4.01, l'attributo height di <td> è obsoleto. Usa CSS invece.
Sintassi CSS: <td style="height:100px">
Esempio CSS: Imposta l'altezza della cella della tabella
Nel nostro tutorial CSS, puoi trovare ulteriori informazioni su Attributo height dettagli.
<td height="pixels|%">
Valore | Descrizione |
---|---|
pixels | Imposta un valore di altezza in pixel (ad esempio height="50"). |
% | Imposta un valore di altezza percentuale per l'elemento (ad esempio height="50%"). |