Ahh, that lovely little “XHTML 1.0 Strict Valid!” and “CSS2 Valid!” footer icon. It creates a nice warm squishy feeling in my tummy when I see it as it assures me that I can rely on closed tags and consistent cross-browser appearance.
At least thats the theory the W3C had in mind.
How important is valid markup and CSS really though? I used to be quite the “fire and brimstone” apostle of the valid markup camp, but in my years of actual real world experience, I’m beginning to change my tune a bit. Does valid markup have its place, I would still argue an absolute affirmative. There really is no excuse to not have valid markup. If you aren’t closing tags and using deprecated attributes, you’re only causing problems for yourself when it comes to cross-browser compatibility, not to mention manipulating the DOM with JavaScript. CSS on the other hand is an entirely different beast all together.
How important is it that CSS be valid? With the rapid pace that the web is moving, not that much anymore. We’re finally beginning to see some actual movement in the realm of CSS3 browser support and this has introduced all sorts of fabulous effects, tricks, etc. that everyone wants to use in their design. These effects go all the way from simple opacity adjustment, to full on drop shadow support in modern versions of Webkit based browsers (i.e. Safari 4+ and Chrome 3+). If you are no longer supporting ancient versions of Internet Explorer (yes, I would say IE6 is ancient) and are OK with some older browsers not displaying all of your nifty effects, then you’re going to want to take advantage of these great CSS3 styles. The problem you encounter here is that none of these styles are “valid CSS” – but really, is it that important that -moz-border-radius-topright and -webkit-border-top-right-radius invalidate the CSS file? I would say no. Just because W3C is slow on the uptake of adopting rounded corner border style implementations and other commonly used browsers are pushing the envelope shouldn’t hold designers and developers back. The W3C has its place, but it is historically slow on adopting anything. It always catches up eventually, but should we slow the entire heard because we’ve got one behemoth slogging it in the back?
Now, don’t get me wrong, I am not excusing hacks, profuse implementation of all inclusive definitions via the lovely * definition, or relying heavily on these advanced styles. No, you should still be making sure that you’ve got proper syntax, closed curly braces and appropriate semi-colon distribution. You might even want to consider a JavaScript backup for some of these natively supported effects for a few of the browsers who are still trying to catch up.
So, in conclusion, I still think its important for your markup to be valid – I’m looking at you WordPress plugin developers, quit being lazy asses and add that self-closing forward slash and alt tags to images. These are things that help with accessibility and adaptation to new browsers that are coming out on platforms that didn’t even exist a year ago. CSS validation though really does need to catch up. The W3C is laggin’ and we want to keep pushing out the coolest designs and effects on the web, get with the program and catch up!


Comments 0
There are no comments for this post so far.
Leave a Comment