Tables for layout?

Recently, both Andy Budd and Dave Shea have written about how they consider using tables for layout acceptable in some cases. While I understand what they mean by this, I’m concerned that some people may use it as an excuse for not even trying to learn how to layout a document with CSS.

Some say that CSS is too hard. Well, everything is hard until you know how it works. Let’s see, I’ll open up that wicked k00l pixel-perfect site i built back in -97 and see if I can understand it today. If I find my way through all the frames and down four or five levels of nested tables with colspan here and rowspan there, font tags and spacer gifs all over the place but no semantic or structural markup whatsoever, I may actually find a little bit of actual content in there somewhere. How is that any easier than using CSS to layout and style clean, structural and semantic markup? The only reason some may find it easier is because that’s what they are used to. Try putting someone who has never used tables for layout in front of a 20th century piece of “HTML” and ask them if it looks “easy”.

Besides, who says building web sites is easy? Sure, just about anyone can whip up something, as long as they can use a WYSIWYG editor. But building a usable, fully accessible, attractive, quick loading web site that meets client and user expectations and is liked by search engines is hard. Even if you use tables for layout. There’s no way around that.

Yes, I know neither Andy nor Dave are suggesting we go back to coding tag soup. But there is a risk that some people may interpret it that way, and continue using tables for all layout, since that’s what they are most comfortable with. You know, the path of least resistance.

Anyway, I don’t want to sound like a CSS zealot here, so I’ll offer a piece of advice: If you want to keep using tables for layout because doing so makes your life easier, go ahead. But please use as few tables as possible, don’t nest tables, make sure your tables make sense when they are linearized, validate your code (which, among other things, means you need to remove all those height attributes from your table elements), use semantic markup inside your table cells, and keep learning.

Comments

1. May 17, 2004 by Rimantas

Oh, thanks. That is exactly what I was trying to say, only your will be heard (I hope).

2. May 17, 2004 by Steven

i think u misunderstood what Shea was trying to say...

3. May 18, 2004 by Roger

Steven: Nope. I did not misunderstand him:

Yes, I know neither Andy nor Dave are suggesting we go back to coding tag soup.

Sorry, comments are closed for this post.

Information, sponsorship, and externals

About the author

Roger Johansson is a Swedish web professional specialising in web standards, accessibility, and usability. More about me and this site.

Subscribe

Looking for web hosting?

Try DreamHost!

Use the promo code 456BEREASTREET3 to save USD 20 when you sign up!

Latest articles

Validation statistics from Nikita the Spider Comments off
An analysis of the sites crawled by the bulk validation tool Nikita the Spider during March 2008.
Authentic Jobs API and Affiliates program Comments off
The Authentic Jobs job listing service now has a public API and an affiliate program.
What does Acid3 mean to you and me? Comments off
Opera and Apple have announced that their web browsers pass the Acid3 Browser Test, but how will that help web designers and developers?
Designing Web Navigation (Book review) Comments off
Learn the fundamentals of navigation design and design better navigation systems for large and small sites as well as for web based applications.
DOMAssistant bundle for TextMate Comments off
To save keystrokes and speed up development I have created a DOMAssistant bundle for TextMate.
First impressions of Internet Explorer 8 Beta 1 Comments off
My impressions after trying out Internet Explorer 8 Beta 1 for a couple of days.

More articles

Favourites, here and elsewhere

Affiliation

  • NetRelations
  • Kaffesnobben
  • Dagens recept
  • 9rules network member

Support this site

Show your support by buying a book or two from SitePoint or getting me something from my Amazon Wish List.