LuzCannon.com

The Work of David Brooks

Umm... Your CSS is Gone.

April 08, 2008

If you’re reading this from the website, and maybe even if you’re reading it from a RSS feed reader… And assuming it’s April 9, 2008, you might be wondering what happened to the styling of my website.

No ladybug, no columns, nothing, but there’s a really good reason. Today is CSS Naked Day.

I wrote that last statement with full knowledge that my Mint statistics are going to be peculiar from this point on. Nevertheless this post is about style and content.

Though I don’t talk about it as much as I’d like to, mainly because I think the topic gets covered so very often, I’m a huge fan of Web Standards. Furthermore I’m a fan of separating style (CSS), content (xHTML), behavior (JavaScript and jQuery) and the underlying foundation (PHP and Textpattern) and data structure (MySQL). I’m not a fan of that because it’s the popular thing to do, I’m a fan because it makes my life so much easier.

CSS Naked Day is about focusing on the importance of proper use of (x)HTML and separating it from your CSS. If I had use tables with hard coded CSS it would have taken me much longer to remove the style from this site for an event like this. As it is now, I just remove the CSS reference and call it a day. On any other day the site looks like a regular website, but I like to think that you can tell it doesn’t use tables. Just humor me, okay?

So Why Naked?

Well, the point of the “holiday” is to draw attention to what web standards is. The easiest way to show the concept is to start pealing away layers. In this case we’re taking the CSS out of the equation so that everyone can see exactly what a particular site looks like without it. A good website should be completely functional without CSS or JavaScript enabled, hopefully I accomplished that.

I also write this article with the full understanding that I didn’t scratch the surface of what web standards truly is. And I think it’s completely fine to leave the rest of the conversation up to the other members of the web standards community. But I would have been participating just to participate if I hadn’t written something about how important it is to separate your style from the rest of your site. If you don’t do that already, do it for yourself. You’ll wonder why you never did it before.

Editor’s Note: When I originally wrote this I failed to put an image of the site without CSS in the writeup. After a few requests I now have that available. I made it a link because of the peculiar dimensions of the image.

Tagged:

css standards web

Comments

  1. Nathan Smith   Apr 10, 01:18 AM

    Pssh… Tables for life!


  2. David Brooks   Apr 10, 01:24 AM

    Nathan: Had I been thinking, a tables based layout would have been perfect for April 1st. Of course, now that I’ve mentioned it I’ve ruined the joke for next year…


  3. Leslie   Apr 21, 08:40 PM

    You can’t say “today is CSS naked day” and then not post for the next 2 weeks :) It kinda makes the post irrelevant starting the next day onwards :D Perhaps you could place a link to a screencapture for us to see your site css-naked (not that we want or can’t do that by ourselves…but just because the number of people using the webdeveloper plugin is miniscule compared to the world population :) )


  4. David Brooks   Apr 22, 09:28 AM

    Leslie: I’ve been caught! Again! You’re right, I definitely should have put an image to show what the site was like on that day. I have just included a link above for all who are interested in such things. Thanks for pointing it out, Leslie and Rob.