More Props for CSS

Yikes, it seems there’s been some anti-CSS talk recently. Simon Willison defends it in an intelligent way. Key points that I agree with are below:

Less Code. It’s easy to understand that a CSS layout takes far fewer lines of code than a nested table one. CSS is read once and then cached (which can be annoying at times). Less code means, faster downloads and a smaller footprint. It saves money, people. Just ask ESPN.com, who recently went CSS on their homepage, saving a gazillion terrabytes or something in bandwidth (I’m too lazy to dig up the link where this is quoted), or what we’ve just done with Fast Company — where page load has proven to decrease dramatically.

Accessibility. It’s a fact that coding with structure in mind will make the content of pages more accessible. People can easily read in text and speech readers as well as all browsers. They might not get the design details — but they will be able to read the darn thing. And isn’t that what counts the most?

CSS isn’t all that hard. It’s true. Too many are giving up because CSS doesn’t solve all of their problems easily. All it takes is a little reading. Just like it did to learn HTML — and the payoff is much greater. A lot of the anti-CSS rants I’ve been reading sound like they come from someone that does not really want to give much effort into learning it. Sure there are browser quirks. But getting around those quirks isn’t impossible.

Tables are not evil. Yes, you read correctly. Tables are perfectly fine — it’s about separating presentational markup from structural markup. When you separate, you get all sorts of benefits. Use tables for what they were designed for. Heck use them to layout a basic framework, then use CSS to handle the rest. It doesn’t have to be one way or the other. In fact, use what’s best depending on the project. Just don’t bash a technology that can improve things for everyone.

</props>