Standards Compliance: Just Do it, Already
Dear coders: please write your HTML/XHTML code to be standards-compliant. Yes, I know — we’ve been down this road before. Folks have tested compliant versus non-compliant code, and it doesn’t help with search rankings, so why bother, blah blah blah. Just use the damned standards, OK? Standards compliance does impact rankings, albeit indirectly: Standards compliance […]
Dear coders: please write your HTML/XHTML code to be standards-compliant.
Yes, I know — we’ve been down this road before. Folks have tested compliant versus non-compliant code, and it doesn’t help with search rankings, so why bother, blah blah blah.
Just use the damned standards, OK? Standards compliance does impact rankings, albeit indirectly: Standards compliance leads to lean code, which leads to deeper crawls, which then leads to deeper indexation of your site.
Standards Compliance Means Deeper Crawls
Search bots come to your site with a ‘budget’ defined by a the amount of time they’ll spend crawling your site. Don’t believe me? Look at this Google Webmaster Tools crawl stats report:
Compare the highlighted areas. When the time spent downloading a page goes down, the number of pages crawled goes up. And more pages crawled means a better shot at better rankings for more terms.
One way to decrease the time search bots spend downloading each page on your site? Reduce the amount of code on each page, so that there’s less to download.
And one way to do that? Standards compliance.
Why Standards Compliance Leads To Streamlined Code
Since I can’t establish a direct link between standards compliance and rankings, I sometimes give in to coders and say, “Fine, don’t use standards”. Inevitably, the resulting code is rife with:
- Inline and embedded javascript;
- Inline and embedded CSS;
- Table-itis, where tables are used to position every element on the page;
- Use of steam-powered attributes like font size=.
I could go on, but I’ll start grinding my teeth.
When folks stick to standards, though, they tend to root out all the inline and embedded garbage. It’s a lot easier to write code that follows web standards if you can see it, and eliminating a few hundred lines of unnecessary stuff goes a long way to readability. So inline javascript ends up in .js include files, where it should be. Tables are used for data. And things like font attributes tend to disappear.
Also, web standards mandate moving as much of the stuff that controls the appearance of a page into external .css files. So again, inline and embedded styles and tags that control appearance move out into external files.
Removal of all that extra bloat leads to faster loading, streamlined code. And it really does make life for the search engines easier. When a search spider visits your site, it ignores javascript and CSS information that’s in include files. So the spiders spend less time on each page.
And it’s not a small difference. Even on small, simple sites, cleaner code can reduce file size of a typical page by 30-40%.
You’ve Got Nothing To Lose
To see the ranking benefits, you don’t need 100% perfect, standards-compliant HTML/XHTML throughout your site. All you need to do is clean things up, use elements the way they’re meant to be used, and move everything that controls appearance to the stylesheet(s).
The real argument around web standards isn’t why — it’s why not. Even ignoring search engine optimization, even if you’ve got your eye on HTML 5, getting your site compliant with current standards will mean an easier upgrade later on. It will also simplify converting your site to a mobile layout, and give visitors the most consistent experience across browsers and platforms (note I didn’t say perfect – I said most consistent.)
Put in the time now, and start realizing the benefits to SEO, site performance and future site changes.
Contributing authors are invited to create content for Search Engine Land and are chosen for their expertise and contribution to the search community. Our contributors work under the oversight of the editorial staff and contributions are checked for quality and relevance to our readers. The opinions they express are their own.
Related stories
New on Search Engine Land