Any web developer that’s been around a while remembers the magic of table layouts. It was part of every tutorial on how to create a website. The days have changed and now we see a big push for CSS everywhere. CSS zealots are everywhere, almost as prolific and dedicated as Mac fans! But is CSS evangelism all it’s cracked up to be?
I recently read a blog post named The shallowness of CSS evangelism. Clearly titled to get a hair raising out of any CSS fan-boy. The post was debunking some of the common myths of the CSS vs. Table layout debate put forth in this blog post. To be honest I’ve been exposed to the ‘CSS is the best way to go’ line for so long that I’ve become to take it as fact. I’ve clearly broken the unwritten cardinal rule of coding: Keep it Simple Stupid (KISS). So here comes the wakeup call:
CSS versus tables is another known permathread. It's only recently that the voice in favour of tables layout has improved it's position significantly. Unfortunately the same cannot be said about the rabid pro-CSS group. They continue to spout nonsense and hope no-one looks too deeply at the arguments, and hope enough commenters reply that it couldn't have been said better. Except there is large room for improvement, or perhaps reformulating the argument into something that is backed by real world evidence.
The pro-CSS article lays out 13 ways that CSS trumps table based design. These are:
1.Faster page loading
2.Lowered hosting costs
3.Redesigns are more efficient
4.Redesigns are less expensive
5.Visual consistency maintained throughout website(s)
6.Better for SEO
7.Accessibility
8.Competitive edge (job security)
9.Quick website-wide updates
10.Easier for teams to maintain (and individuals)
11.Increased usability
12.More complex layouts and designs
13.No spacer gifs
The pro-Table author does a good job to debunk all of these. The ones that I found questionable that the pro-CSS article even made were: 6) Better for SEO, 11) Increased usability, and 10) Easier for teams to maintain. The anti-CSS post did a good job debunking, but I would like to add to these three, and who knows, maybe add them to my standard interview questions.
6) Better for SEO
I have no idea how you could even make this argument. It’s all about the content, and it always has been. In fact you could make the arguments that, for the most popular search engines it’s all about back links.
11) Increased Usability
If anything it complicates usability. Make all the print-friendly arguments you want, but have you tried to keep up with the browser market lately? Most browsers interpret a table layout the same way.
10) Easier for teams to maintain
I just got this picture in my head of my test automation guy blowing a gasket. All pages in the site are updated? One layout change can have a significant impact on other teams. It’s not trivial and can add risk and time to any project. I wonder what the project guys at Microsoft, Google, or Amazon would say if some developer ‘easily’ changed some menu layouts!
This is an interesting argument, one in which I agree with the anti-CSS post, we need to have an open dialog before accepting something as fact. It’s a lesson for me and I hope you can learn from it as well.