Valid code- and civil disobedience
One of the beautiful things about WordPress is that it creates valid code automatically for you (for the most part) and that should help you sleep well at night.
Not that most people understand what valid code is, or care- Google doesn’t (as proven in posts by Matt Cutts from Google). I seem to recall Matt citing something like less than 40% of sites actually validate.
For those of you who wonder- valid code is using perfect grammar and syntax for computers- not for us human beings. It can help with accessibility- which is important to those who count on it- and it helps with Google indexing your site- but, like a book that is written without any hint of the flavor of language- it can create very boring looking sites.
Mike Davidson coded ESPN.com before moving to newsvine.com– and he hates HTML generated typography so much- he invented a way around it- which can break “the standards”- so, he also decided to be a revolutionary- and create a standard breaking icon to put on his site- and explains his reasoning- and takes the heat of all geekdom. It’s a good read for those of you who understand webstandards- and should be enough to scare away the timid:
Mike Davidson: March to Your Own Standard
So whatâ€™s up with the little grey button at the bottom of this site? It is my official Invalidation Badge. Itâ€™s mere presence on every page of this site renders my entire domain XHTML 1.0 Non-Compliant. Invalid. Erroneous. Whatever you want to call it. Here are the various crimes this one line of code commits:
* An ampersand is not properly encoded
* An alt tag is missing
* An attribute called â€œmyfavoritetagâ€ is made up
* An attribute is missing quotes
* A script tag is missing its type and language attributes
* A non-closing tag is missing its trailing slash
* A tag is upper caseâ€¦ gasp!
By invalidating my entire site with this one line of code, I ensure that I am made aware the instant it matters. The instant this stuff starts to break anything in the real world, I will know. If I only had a few small errors on a few random pages around my site, I could easily miss the day when â€œthe big switchoverâ€ happens and wind up with broken pages I donâ€™t know about. And since this code is in the form of a server-side include, I can freely remove it with a few clicks.
Itâ€™s kind of like carrying a canary down a mine shaft with you. As long as the canary is alive and chirping, you know youâ€™re okay for air. Actually, I guess itâ€™s not really like that. read the rest of the article….