1. Home
  2. Computing & Technology
  3. Personal Web Pages

Jumping Over Tables - For Fun, Design and Organizing

By Linda Roeder, About.com

7 of 10

Table Cellpadding and Cellspacing

Table Cellpadding and Cellspacing

Table Cellpadding and Cellspacing

cellpadding

The cellpadding tag is used to create space between the text inside your table and the border surrounding that text.

The code for the cellpadding tag goes inside the table tags and will look like this:

<table border="1" bordercolor="red" cellpadding="10">
<tr>
<td><B>row 1, column 1</B></td><td><B>row 1, columnn 2</B></td>
</tr>
</table>

cellspacing

The cellspacing tag is to create space between different cells within your table.

The code for the cellspacing tag goes inside the table tags and will look like this:

<table border="0" cellspacing="10">
<tr>
<td bgcolor="cccccc"><B>row 1, column 1</B></td><td bgcolor="cccccc"><B>row 1, columnn 2</B></td>
</tr>
</table>

Below is what this looks like:

Explore Personal Web Pages
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Personal Web Pages
  4. Tables
  5. Table Cellpadding and Cellspacing

©2009 About.com, a part of The New York Times Company.

All rights reserved.