Nearly every single time I recommend cleaning up the code on a website, the response I get back is: “But Why? I hear it doesn’t matter.”
My question is, where did you hear this? From someone who writes sloppy code, perhaps?
It is easier to write invalid code – that’s all it has going for it. The average WYSIWYG editor makes such websites at a mile a minute. (What You See Is What You Get – Programs like Dreamweaver, which are used to build websites visually but do not require that you look at the code to do so.) Even if they are invalid in code, these sites look pretty and that is all that usually matters to people. Standards seem pesky to deal with when you can build a site which gives every appearance (visually) of being fine, despite the messy code.
Here’s a great article about standards compliance and why to do it from Ian Lurie, who I met at a search conference once. I like the guy and he’s spot-on about this. When I’ve made a site’s code valid for a client, it has actually never failed me in my efforts to improve its ranking. Read the article and then come back here.
(Whistles while she waits…)
OK, done? Now, check your own site against the standards here:
CSS Validity check
HTML and XHTML validity check
If they’re incorrectly coded, get it fixed.
Seriously. Why build if you’re not going to finish building it to code? Think about how SEOs talk about the importance of architecture. This is part of what we are talking about.
When you’re talking to a search engine, you’re essentially talking to a machine, and speaking their language fluently makes you that much more likely to actually communicate to that machine.
And while you’re at it…
Log into your Google Webmaster Tools and check your “site performance” (page load speed improvement recommendations) in the Google labs section. Â If you have recommendations, implement them. Â Or at least all that make sense for your site.
Why code validly?
Because it makes your communication clearer to the machines on the web. It avoids glitchy browser problems. In my experience,  most  sites will perform near-flawlessly beginning from the day they standardize–in nearly any browser for nearly any kind of visitor.
Really, you have no right to complain about needing to improve visitor experience if you haven’t yet smoothed out the display issues caused by invalid code.
Implementing web standards makes your pages load better and can cut down on server load. It makes it easier to make site-wide changes. It makes the time you spend doing on-site SEO that much more powerful. Because cleaning up your code is a lot like cleaning up your desk and finding bonus Post-its you forgot you had. You might find opportunities to promote better that you didn’t know were there through all the mess. At least I have always experienced that to be the truth. Pretty much every time.
And good code…is just good tech. A job done right is worth doing.