Website layout with HTML tables versus CSS
For a long time it´s been a common practice to use HTML tables to design a website´s layout. But in a HTML purist´s view, this technique is deprecated (and always has been), because HTML tables are meant to organize content in a tabular format ( see calendar in the right column, for example ) and today, CSS (cascading style sheets) give web authors the possibility to create sophisticated website layouts.
I agree that most of the styles on a webpage should be done in CSS, defining the style rules in an external style sheet. This way, your webpages won´t be cluttered with lots of recurring font tags and style attributes and you will get a higher percentage of real content in the source code of your webpages, which is beneficial for your webpages´ rankings. Another advantage of CSS is that you can easily change the styles on all pages of your website by modifying only a single file - the style sheet.
In theory, a website layout can be well done purely with CSS, but there are certain limitations and problems, most of them caused by browser incompatibilities. I´m not an expert in CSS, but I´ve seen lots of website layouts done with CSS, where the content breaks the layout and boxes overlap each other, making certain parts of the content unreadable.
Eric Costello has some nice basic CSS website layouts that you can copy and play around with. But until today, I haven´t found an example for a website layout which does what can be done with the famous “table trick”.
Using the HTML table trick ( see templates in my html tutorial, I can create a search engine optimized website layout with 3 columns (2 sidebars and the center column with the main content). Usually, using a pure CSS layout, the content of the left column would come first in the source code, then the main content and finally the right column. But with the HTML table trick, I can move the main content to the top in the source code.
That´s why I´m still using HTML tables to create the main boxes in those website layouts where SEO is the most important way to generate traffic. Hint: not all websites need to be laid out to rank well in the search engines in order to get traffic. There are quite a lot of other techniques to attract visitors to your websites. But that´s a different topic.