TUTORIALS » HTML / JavaScript » HTML essentials (guided tutorials)Tables in HTMLPage 6 of 6You are in page:» 6. Cell spacing & Cell padding Cell spacingcellspacing is the attribute of a table that defines the distance between each cell of a table. The default value is 1.Example: <table cellspacing="20" border="1"> <tr> <td>JOHN</td> <td>SANDY</td> </tr> <tr> <td>PETER</td> <td>MARY</td> </tr> </table> Will render: Cell paddingcellpadding is the attribute of a table that defines the distance between the border of each cell and its contents. The default value is 1.Example: <table cellpadding="20" border="1"> <tr> <td>JOHN</td> <td>SANDY</td> </tr> <tr> <td>PETER</td> <td>MARY</td> </tr> </table> Will render:
Congratulations! You just learned all the basics you need to create clean, good looking tables. Remember, you need to practice a lot if you really want to become a pro. I'll see you in the next tutorial.
|
|