Why use CSS?

After reading through all the comments on a current digg submission regarding the rampant use of tables, I started to wonder why I even began coding in CSS.

Although I have built a fair number of CSS layouts for web apps (examples in my resume), I have NEVER actually built anything using TABLES. This fact makes it impossible for me to really experience the differences, benefits, and complications between the two methods. Most of my appreciation ( perhaps misleading ) for CSS came from my reading of other people’s experiences, and claims from sites such as csszengarden, a list apart, csscreator, etc…

The comments on this digg submission seems to be preaching the opposite. It made me realize that there are many people out there who do not think that CSS is beneficial when TABLES are much easier to control, and CSS requires a lot tweaking and hacking ( a fact I cannot deny ). They also pointed out that the inherent benefits of using CSS, such as: loading speed, cross-browser compatibility, and development time, are not worth all the troubles and inconsistencies involved with using CSS.

As someone who have a good amount of experience with CSS, I must admit, they are right. Even though CSS is great for building complex designs and DOM scripting with JavaScript, sometimes TABLES are just easier to use. There have been so many times in my professional experience when a client would ask for a simple alignment, and it would take me hours just to achieve the effect. For example, vertical alignment, equal height columns, and of course, like we all know, displaying tabular data.

So there, I admit it, TABLES are SOMETIMES useful and easier than CSS.

But in defense of CSS, I would like to offer some counter arguments. First, a lot of the people who complain about CSS, simply don’t know how to use CSS properly. This is just a fact of life: ignorance breeds prejudice. Just because you do understand “position: relative”, does not mean “position: relative” suck. You suck for not understanding it. Second, with CSS you can change styles easily and in one centralized place. And lastly, the teaching of CSS coincide directly with good SEO practices. When every bit of SERP counts for your company, this is one powerful tool in your arsenal.

In conclusion, CSS is the future and you should learn to embrace it. However, lets not be snobby about CSS because nothing is perfect. Sometimes, the old way just works better. ;) Oh btw, it took me a long time to write this entry because I had to concentrate on my grammar. :)