inessential by Brent Simmons


My boss asks why use CSS instead of tables for layout? My response:

It’s nothing more or less than separating form from content.

It is now possible to make your HTML completely free of style and layout information. It can be purely structural. No font tags; no b, i, u; no tables.

All style and layout can be done in a style sheet.

It’s irresistible (for me) for the exact same reason a CMS is irresistible—it makes it much easier to maintain a site.

But it’s not a cause (for me). I don’t care how Joe Blow works; I care about how I work.

There are some additional side benefits of using CSS over tables—it’s far easier to create accessible pages, which many people must do by law or by their organization’s guidelines.

It also means you can do things like print-friendly pages without any server-side work—the print-friendly page is just a different style sheet, another view of the exact same page.

Now you might wonder why this site still uses tables. Simple: because I haven’t had time to re-do it.

Plus it makes your clothes brighter and your smile whiter.

As far as standards go, my favorite isn’t CSS but DCCP—Distributed Cold Cuts Protocol—which makes possible Web Salamis, server-side prosciutto processing, and so on.