The following article will show you why to stay away from tables when designing a site.
Most web developers and designers will tell you to stay away from tables when developing web sites, of course there are some exceptions, like forms, and data. Instead they will tell you to use CSS. When designing your web site you should use CSS, along with the HTML tag. Now, you may be asking, why? The reasons are below!
1. Tabular Data. Not layouts.
Tables are for Tabular Data. They simply are not for designing a page. Here is a good page at about.com that explains Tabular Data.
2. Nested Tables
Nested tables is a common way to make layouts with tables. With nested tables, one, or more, tables are placed inside each other. There is a problem when designing a page this way, it takes the browser longer to render your page. With CSS there is way less code, and your code is cleaner, therefor it is easier on the browser.
3. Changing fonts, colors, and layouts.
Lets say you had a site with 100 pages, with tables, and you wanted to change the header of every page to blue instead of red. With CSS you could go into the CSS file, included on every one of those 100 pages, and change the font-color to blue. It would then update all of your pages with the color blue. With tables you would have to open every one of those pages and change the color.
4. Invalid XHTML
When using tables for your web page layout, you are writing invalid XHTML. You should only use tables when you are working with Tabular Data, as I stated above.
5. Smaller HTML files
No one wants a huge HTML file, full of messy code, right? Well, this is just another reason to use CSS. Since you can call your CSS style sheet from external file, it doesn't even need to be in your HTML file to work, making it even smaller.
LeetWebmasters.com is home to tutorials, tips, resources, and scripts for your web sites!
Home Page - http://www.leetwebmasters.com
Community Forum - http://www.leetwebmasters.com/community