Improve Site Performance Increase Site Traffic Monitor Site Uptime Webmaster Resources NetMechanic Home Looking For Help? Partner Programs Privacy Policy Contact Us Press Room
NetMechanic Home LOGIN | HELP | ABOUT US | PRODUCTS | SITE MAP
NetMechanic Menu
Over 52 Million Web Pages Tested!     
 

Search for:


Your Email:

I would like to receive my newsletter in:
HTML format
Text format



Volume 8 (2005)
   September
   June
   April
   March
   January

Volume 7 (2004)
   November
   September
   July
   June
   May
   April
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 6 (2003)
   December
   November (Part 2)
   November
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 5 (2002)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 4 (2001)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 3 (2000)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June
   May
   April
   March
   February
   January

Volume 2 (1999)
   December
   November
   October
   September
   July
   June
   May
   April
   March
   February
   January

Volume 1 (1998)
   December
   November
   October
   September

 
Updated October 22, 2001

HTML Tip:
Close Your Table Tags

by Tom Dahm,
Chief Operations Officer,
NetMechanic, Inc.

  
April 1999
Vol. 2, No. 4
 • HTML Tip
 • Design Tip
 • Advertising Tip
  

If you use nested tables on your page, be sure to close your TR and TD tags. If you don't, your tables may not be rendered correctly in Netscape Navigator.

HTML tables are built using a combination of the TABLE, TR, and TD tags. According to the HTML standards, the last two of these tags don't need to be closed; the </TR> and </TD> tags are optional.

For example, this is legal syntax for a table having two rows and two columns, with each table cell having a different background color:

<TABLE BORDER=2>
<TR>
<TD BGCOLOR="red"> cell 11 
<TD BGCOLOR="pink"> cell 12 
<TR>
<TD BGCOLOR="yellow"> cell 21 
<TD BGCOLOR="tan">  cell 22
</TABLE>

If this table is the only thing in your HTML source, it will display just fine under all major browsers, including Netscape Navigator 4.x, Netscape Navigator 6.x, and Microsoft Internet Explorer 4.0 and up.

However, Netscape Navigator has a long-standing bug in its table parsing algorithm that appears when a table is nested inside another table. Suppose we place the table from the last example inside another single cell table, as shown below:

<TABLE BORDER=5>
<TR>
<TD ALIGN="center">
<B>outer table</B>
<TABLE BORDER=2>
<TR>
<TD BGCOLOR="red"> cell 11 
<TD BGCOLOR="pink"> cell 12 
<TR>
<TD BGCOLOR="yellow"> cell 21 
<TD BGCOLOR="tan">  cell 22
</TABLE>
</TABLE>

Figure 1 shows how this page looks in Internet Explorer 4.0.

Nested tables in IE4

Figure 1 - Nested Tables
Viewed with IE4

Nested tables in NN4

Figure 2 - Nested Tables
Viewed with NN4

Now look at Figure 2, which shows the same code as viewed by Netscape Navigator 4.7. Notice that the second column of each row has disappeared! Even Netscape 6.0, which corrected so many browser incompatibility problems, displays it like this.

We can easily fix this by closing each of the TR and TD tags, as shown below:

<TABLE BORDER="5">
  <TR>
    <TD ALIGN="center">
      <B>outer table</B>
      <TABLE BORDER="2">
        <TR>
          <TD BGCOLOR="red"> cell 11 </TD>
          <TD BGCOLOR="pink"> cell 12 </TD>
        </TR>
        <TR>
          <TD BGCOLOR="yellow"> cell 21 </TD>
          <TD BGCOLOR="tan">  cell 22 </TD>
        </TR>
      </TABLE>
    </TD>
  </TR>
</TABLE>

Surprisingly, this bug has been around since Navigator 2.0. Perhaps Netscape will correct this bug in future versions. Even so, older versions will remain in circulation for a long time. It's best to play it safe and close your TR and TD tags.



Rate This Tip:
Not Useful Useful Very Useful   
 
NetMechanic Tools
HTML Toolbox
Browser Photo
Server Check
Search Engine Starter
Search Engine Tools
GIFBot
Newsletter
HTML Tutorial and Tips
Search Engine Tutorial
Accessibility Information
Browser Problem Tutorial

Company Info
Products
About Us
Contact
Advertise
Link To Us
Jobs
Privacy Policy
Partner Programs
Press Room
RSS Feed
Support
 



Powered by Overture!

 
     
 
   
 
     


Keynote Home
Copyright © 1996-2007,
Keynote NetMechanic
All rights reserved.