About us Privacy Disclaimer Contact us
FAQ Help Advertising Feedback
Home Sitemap Search Donate us

  Home > Computer & I'net > Cellpadding & Cellspacing...

   Browse by title articles:
   What is hot:

Images

Links

Music & Sound

Table, TR & TD

Width, Border, Align, Valign

Cellpadding & Cellspacing

Metacharacters
FRAMES & RULES
Creating/Accessing Arrays
Fieldset & Legend
Prev articles12 3 45678910Next articles



Cellpadding & Cellspacing


Computer & I'net articlesCellpadding & Cellspacing

by David Stanley    



The TABLE tag has two properties known as CELLSPACING and CELLPADDING. Here is a table example without these properties on. These properties may be used seperatly or together. The examples shown are separate to show you the difference easier.

<table border="1">
<tr>
<td>some text</td>
<td>some text</td>
</tr><tr>
<td>some text</td>
<td>some text</td>
</tr>
</table>
some text some text
some text some text
CELLSPACING is the pixel width between the individual data cells in the TABLE. (The thickness of the lines makeing the TABLE grid). The default is zero. If the BORDER is set at 0, the CELLSPACING lines will be invisible.

<table border="1" cellspacing="5">
<tr>
<td>some text</td>
<td>some text</td>
</tr><tr>
<td>some text</td>
<td>some text</td>
</tr>
</table>
some text some text
some text some text
CELLPADDING is the pixel space between the cell contents and the cell border. The default for this property is also zero. This feature is not used often, but sometimes comes in handy when you have your borders turned on and you want the contents to be "away" from the border a bit for easy viewing. CELLPADDING is invisible, even with the BORDER property turned on.

<table border="1" cellpadding="10">
<tr>
<td>some text</td>
<td>some text</td>
</tr><tr>
<td>some text</td>
<td>some text</td>
</tr>
</table>
some text some text
some text some text



-----------------
Article by David Stanley. Visit his site http://www.htmlite.com. Reprinted with permission.





Credit card




  Disclaimer | Privacy | Terms of useCopyright © 2004 Nice2know.com