Nested Tables
05 June 2004
HTML was never
designed to be a layout language. The <table>
element was designed to mark-up tabular data. When tables are nested
(i.e. when one table is placed inside another table), it is almost
always because they are being abused for layout purposes.
Tabular data looks something like this:
Name | Age | Sex |
---|---|---|
Spandral | 24 | Male |
Rani | 7 | Female |
Borusa | 45 | Male |
Fenric | 75 | Male |
If you have nested tables, then you should follow this flow chart:
On the other hand, there is a language designed specifically for handling presentational issues on webpages. CSS has the extra benefits of making pages more manageable, accessible, and faster to download.
- Resources for getting started with Cascading Style Sheets
- Tableless Layouts
- Contact me
If you really do have data that should be in nested tables, I do want to see it! However, while this page has been online for several years, and been viewed by many people, I've only had one submission - and it was an example of tables being abused for layout.