CSS or Not CSS?

Dave Winer writes: “Thanks to Zeldman for the pointer to a table-less three-column liquid CSS-based site that degrades gracefully (that’s a mouthful). Now I’ve been trying to figure out why this is so important. I wrote XML-RPC for Newbies, to help people understand why it’s so important to geekish Web developers. Would a designer please write a Table-less CSS Templates for Newbies, to explain why tables are evil. I don’t get it. Or is this just gymnastics, which is cool, but tell us so, please.”

Here’s my take: tables are fine for layout if your readers are not in the least disabled and are using browsers over fast connections (most browsers wait for the closing table tag to render the page which can take a very long time over slow connections.) But if your users are on slow connections, are disabled, or simply have their own needs for viewing content (more on this in a sec), tables are very limiting. The original intent of HTML was markup, that is, taking content and defining what it is, not necessarily how it was to look. This latter decision was left up to the user (remember those horribly complicated style preferences in the old web browsers?) We’ve drifted from that and now people are marking up their content full of styles and rules for display and making their pages largely a single thing which cannot be altered.

Tables do not degrade well for blind users. They are read row by row, left to right. For most users it means that they have to sit through useless information which is horribly repetetive. Take Dave’s own Scripting News site. A blind user would have to sit through the entire left blogrolling column before getting to the content, every single time they load the page. What a nightmare! With CSS, this information can be placed last in the HTML and yet displayed in the same place making the content come first.

Of course there are workarounds (invisible skipnav techniques, for example) but these are kludges. Table-less design allows for pure content leaving the look and feel to a separate file and making the content far more accessible. If the Web is truly the medium for all people, then we need to be aware of all users, including the disabled.

One caveat: it’s not a panacea. I still use tables for layout if I cannot achieve a goal using CSS. There are times when it makes sense. But I still design so that I am following all of the guidelines of Section 508 and the WCAG 1.0. To do less would be a disservice to the web community.