English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
A propriedade cellpadding do table especifica o espaçamento entre a parede da célula e o conteúdo da célula (em pixels). HTML5 A propriedade cellpadding do <table> não é suportada, use CSS em vez disso
Defina o espaçamento entre a parede da célula e o conteúdo da célula8pixels:
<table cellpadding="8" border="1"> <tr> <th>Nome</th> <th>Credits</th> </tr> <tr> <td>Zhang San</td> <td>90</td> </tr> <tr> <td>Li Si</td> <td>87</td> </tr> </table>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the cellpadding attribute.
HTML5 The <table> cellpadding attribute is not supported, please use CSS instead.
The cellpadding attribute specifies the space between the cell border and the cell content, in pixels.
Note:Do not confuse this attribute with cellspacing Attributes may be confused, the cellspacing attribute specifies the space between cells.
Tip:From a practical point of view, it is best not to specify cellpadding, but to use CSS to add padding (inner margin).
<table cellpadding="pixels">
Value | Description |
---|---|
pixels | Specify the space between the cell border and the cell content. |