Kid's Guide Publish!
 
 
  Use the Kid's Guide to learn how to write web pages!
then use Publish! to learn how to get your pages live to the Internet!
BACK       

Kid's Guide

1 - Tags
2 - Page Sections
3 - Format/Nesting
4 - Head Tags
5 - Body tags
6 - Text Decoration
7 - Lists
8 - Colour
9 - Source
10 - Images
11 - Links/Anchor Tag
12 - Special Charaters
13 - Tables
    part 1 - rows & columns
    part 2 - backgrounds
    part 3 - alignment
    part 4 - borders
    part 5 - nesting
14 - Frames

Table Backgrounds

Using Colour

You can use bgcolor="#hexadecimal" inside of the <table> and <td> tags. Plus, experiment with cellspacing - space between the cells and cellpadding - space within the cells. In the example below, we have set the cellspacing to 2. This allows 2 pixels between each cell to be visible, in this case you can see the table colour between each cell.

Button Some interesting text about your site.
Button With clever anecdotes and whimsical stories...

<table align="center" bgcolor="#68839E" width="300" height="100" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td align="center" bgcolor="#ff00ff" width="95" height="50"><b>
Button</b></td>
        <td width="205"><b>
Some interesting text about your site.</b></td>
    </tr>
    <tr>
        <td align="center" bgcolor="#00ffff" width="95" height="50"><b>
Button</b></td>
        <td width="205" valign="top"><b>
With clever anecdotes and whimsical stories...</b></td>
    </tr>
</table>

Using Images

Using images as backgrounds inside of cells can be a bit tricky. It looks simple enough - background="source of image" inside of either a <table> or <td> tag.

First - make sure you have set the width="in pixels" and height="in pixels" in each cell to the exact width and height of the image. If the width and height are too small the image will be cropped. If the width and height are too big then the image will tile, or repeat.

Second - not all browsers see images as backgrounds in tables the same way. In Netscape, if you want one image to cover the whole of a table, you must create a clear or transparent gif image to place inside of the <tr> or row tag.

  1. this is the only time you can place an image inside of a row tag
  2. this stops the browser from repeating the image each time it encounters a new cell.

Plus, older versions of Netscape wont permit you to layer one background on top of another, so to be on the safe side, use both the background="" and a matching bgcolor="" so the cells don't load as empty and look silly.

Button Some interesting text about your site.
Button With clever anecdotes and whimsical stories...

<table align="center" background="/images/table_bg.jpg" bgcolor="#68839E" width="300" height="100" border="0" cellspacing="0" cellpadding="0">
    <tr background="/images/clear.gif">
        <td align="center" background="/images/table_button.gif" width="95" height="50"><b>
Button</b></td>
        <td width="205"><b>
Some interesting text about your site.</b></td>
    </tr>
    <tr background="/images/clear.gif">
        <td align="center" background="/images/table_button.gif" width="95" height="50"><b>
Button</b></td>
        <td width="205" valign="top"><b>
With clever anecdotes and whimsical stories...</b></td>
    </tr>
</table>

 

 
Safety and Privacy Policies We'd love to get your feedback! Who Made This?

Copyright © 2002 HTML4KIDSTM. All rights reserved.


Hi! I'm Jet Internet! I'm here to guide you through the site and help you with any questions you may have. When you see and text in red slide your cursor over the word then look here in my Speach bubble. I will be able to help with defining, explaining and providing extra information on that topic.

Cell
Each individual area created by <td></td> = Table Data cell
Can be made as rows, columns or combination of both.

Column
<td></td> = Table Data cell
Multiple Vertical areas within a table.