Domain Registration as low as $14.95

McWebber 1998

McWebber Free HTML Help - Find the help you need to make your web site look great!
BACK TO HOME PAGE
Advanced Tutorials
Frequently Asked Questions
McWebber Favorite Links

Table Help

In the lower frame is a fairly complete list of table tags. There are several tags for tables that Microsoft Internet Explorer supports that Netscape Navigator doesn't:

Below are examples.

ALIGN IMAGES

LEFT IMAGE Here's some text. RIGHT IMAGE

Here's the code for the table above:

<table border="1" cellpadding="2">
<tr>
<td><img src="images/1.gif" width="33" height="30" alt="LEFT IMAGE"></td>
<td>Here's some text.</td>
<td><img src="images/2.gif" width="33" height="30" alt="RIGHT IMAGE"></td>
</tr>
</table>
LEFT IMAGE Here's some text. RIGHT IMAGE

 

BORDERCOLOR
FIRST SECOND
THIRD FOURTH

Here's the code for the table above:

<TABLE BORDER="10" CELLSPACING="0" CELLPADDING="2" BORDERCOLOR="#FF0000">
<CAPTION>BORDERCOLORLIGHT <TR>
<TD>FIRST <TD>SECOND </TR>
<TR>
<TD>THIRD <TD>FOURTH </TR>
</TABLE>

BORDERCOLORLIGHT
FIRST SECOND
THIRD FOURTH

Notice which sides of the table appeared shaded in color on this and the following example.

Here's the code for the table above:
<TABLE BORDER="10" CELLSPACING="0" CELLPADDING="2" BORDERCOLORLIGHT="#FF0000">
<CAPTION>BORDERCOLORLIGHT <TR>
<TD>FIRST <TD>SECOND </TR>
<TR>
<TD>THIRD <TD>FOURTH </TR>
</TABLE>

BORDERCOLORDARK
FIRST SECOND
THIRD FOURTH

Here's the code for the table above:
<TABLE BORDER="10" CELLPADDING="2" BORDERCOLORDARK="#FF0000">
<CAPTION CELLSPACING="0" >BORDERCOLORLIGHT <TR>
<TD>FIRST <TD>SECOND </TR>
<TR>
<TD>THIRD <TD>FOURTH </TR>
</TABLE>

In the following example you'll note that I didn't use a caption.  Because the caption is part of the table, the background image would "bleed" outside the table and behind the caption.  In this case, I simply centered the word "BACKGROUND" over the table. See my HTML page for more info on centering.
Background images are only supported in Internet Explorer and Netscape 4+.

BACKGROUND

FIRST SECOND
THIRD FOURTH

Here's the code for the table above:
<TABLE BORDER="10" CELLPADDING="2" CELLSPACING="0" BACKGROUND="wrldbkgrnd.gif">
<TR>
<TD>FIRST <TD>SECOND </TR>
<TR>
<TD>THIRD <TD>FOURTH </TR>
</TABLE>

In order to get a bordercolor to show in a table in Netscape, you have to use BGCOLOR in your BODY statement and use a BACKGROUND image on your page.  Then the BGCOLOR of the page will show through on the table border contrasting with the background image.  You can use a small .gif of a solid color as your page background.

CELL BACKGROUND COLORS
NOT SUPPORTED BY OLDER BROWSERS

FIRST SECOND
THIRD FOURTH

<TABLE BORDER="10" CELLPADDING="2" CELLSPACING="0">
<TR>
<TD BGCOLOR="#00BDBD">FIRST <TD BGCOLOR="#87cefa">SECOND </TR>
<TR>
<TD BGCOLOR="#3cb371">THIRD <TD BGCOLOR="#ffa07a">FOURTH </TR>
</TABLE>

CELL BACKGROUND COLORS AND NO TABLE BORDERS
This is handy for making a simple toolbar. Just make the text in the table cells into links.
[see mine below]

FIRST SECOND
THIRD FOURTH

<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD BGCOLOR="#00BDBD">FIRST <TD BGCOLOR="#87cefa">SECOND </TR>
<TR>
<TD BGCOLOR="#3cb371">THIRD <TD BGCOLOR="#ffa07a">FOURTH </TR>
</TABLE>

TOP

ALIGN IMAGES
BORDERCOLOR
BORDERCOLORDARK
BORDERCOLORLIGHT
TABLE BACKGROUND
BACKGROUND COLORS

HOME | ADVANCED| FAQ | LINKS

Copyright 1998 McWebber.Com All Rights Reserved.