Devil’s Advocate – 6 Reasons To Keep Using Tables For Your Layout

Monday, February 4th, 2008

Categories: Web Development

RSS Comment Feed

Trackback

AddThis Social Bookmark Button

Devil’s Advocate Series Kevin commented on my previous post on 6 Reasons To Ditch Tables For Your Layout and reminded me how easy it was to do a column-based layout. This article, I will tackle all the advantages I can think of for using a table-based layout instead of a css-based layout. (For those that may be reading this blog for the first time, I’m a strong supporter of css-based layouts. Here are the reasons for adhering to the dark side (in no particular order).

Simpler Concept

The many times I’ve been taught HTML, either as part of school or as part of a course, we started from the basics of HTML coding. Those basics included tables. If tables appear to perform the same tasks as a more advanced, differently coded language, why bother leaping into too concepts.

Easier To Troubleshoot

If you were a beginner and wanted to troubleshoot what it is was going wrong with your table, you’d simply need to add border=”3″ to your <table> tag. You can then easily see where your problem is happening. You can find out if you left out a <td> tag or if you have incomplete rows.

Easier to Use and Visualize

Since you’re dealing with a grid, it’s easier to visualize when inserting your content. DIV containers, with their assortment of attributes, which can make them look any way you want, seem more confusing and harder to decipher.

Better Browser Compatibility

In my experience, tables have always had strong compatibility between browsers. Sure, there have been a few hiccups, but since the table concept is old and refined, it appears to have been mastered amongst browsers. Wouldn’t you love a world where you didn’t have to worry about the 3 pixel bug, floats, absolute positioning, etc.?

Easier Fluid Layouts

If you’re a big fan of fluid layouts (layouts that expand or contract depending on the browser’s viewport), then tables can serve those up quickly and easily. Using width=”XX%” in your <table> tag or <td>, things are a breeze.

Easier Column Layouts

Kevin brought the fact that deploying columns using a table is easy, and it is. If all you’re looking for are simple columns to use as containers for your content, tables are what you’re looking for. If you’ve ever had to set up CSS elements to use as columns, you know how much of a pain in the butt it is.

That’s all for now. Hope that helps.

Bookmark this blog using any bookmark manager!
Subscribe to Pat-Burt.com via RSS


Related Posts


Subscribe to this Post

One Response to “Devil’s Advocate – 6 Reasons To Keep Using Tables For Your Layout”

  1. Nicolas Says:

    Using CSS for columns is really easy.

    .column { display: table-cell; }

    Tables for layout are good. HTML table markup for layout is bad.

    Now, if only IE supported CSS tables…

Leave a Reply