Learn Scripting Languages from the Master!
To add space around the content of a cell, use cellpadding in the table tag. Here are some examples:
| Examples showing different cell padding values | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
||||||||||||||||
If you wanted to create a table with cellpadding of 5 pixels, use the following code:
<table width="40" border="1" cellpadding="5"><tr><td>5</td><td>5</td></tr><tr><td>5</td><td>5</td></tr></table>