cellPadding attribute (table)
Specifies the amount of space between the border of a cell and its contents in a table.
Use the cellSpacing attribute if you want to set the space between cells.
JavaScript page for this attribute: cellPadding. You can find other example(s) there. |
Possible values:
Sets the amount of space between the border of the cell and its contents.
One of the following values:
Integer with or without a px (pixel) designator. | |||||||
Integer higher than or equal to 0 , with a % designator. |
Default: this attribute has no default value.
Example HTML code 1:
This example illustrates the use of the cellPadding attribute:
|
||||
Table, with 10px cellpadding: <table border="3px" cellpadding="10px"> <tr> <td>Apple</td> <td>Pear</td> <td>Peach</td> </tr> </table> <br /><br /> Table, without cellpadding: <table border="3px" cellpadding="0px"> <tr> <td>Apple</td> <td>Pear</td> <td>Peach</td> </tr> </table> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
Related pages:
External links:
cellPadding (MSDN)
cellPadding (Mozilla Developer Center)
cellPadding (Safari Reference Library)
cellPadding (W3C)
cellPadding (Mozilla Developer Center)
cellPadding (Safari Reference Library)
cellPadding (W3C)
User Contributed Comments