1. Home
  2. Computing & Technology
  3. Web Design / HTML

Nested Tables and Page Download Speed

Do Your Pages Take Too Long to Download Because of Tables?

By Jennifer Kyrnin, About.com

A single table on a Web page will not slow downloading. But the moment you put one table within another table, it gets more complicated for the browser to render, and so the page loads more slowly.

Nested Tables for Page Layout

When you create a page with tables, keep in mind that the more tables that are within tables, the slower the page will load. Normally, when a page loads the browser starts at the top of the HTML and loads it sequentially down the page. However, with nested tables, it has to find the end of the table before it can display the entire thing.

Also, if you're trying to write valid XHTML, tables should not be used for layout at all. Tables are for tabular data (such as spreadsheets) not for layout. Instead you should use CSS for layout - this renders more quickly and creates valid XHTML.

Table Design

If you design a table with multiple rows, it can often load more quickly if you write each row as a separate table. For example, you could write a table like this:

<table width="100%">
<tr><td colspan="2">
top row
</td></tr>
<tr><td>
left column
</td><td>
right column
</td></tr>
</table>

But if you wrote the same page as two tables, it would appear to load more quickly, because the browser would render the first and then render the second:

<table width="100%">
<tr><td colspan="2">
top row
</td></tr>
</table>
<table width="100%">
<tr><td>
left column
</td><td>
right column
</td></tr>
</table>

Next Page > Frames and Speed > Page 1, 2, 3

Previous Features

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

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

All rights reserved.