I recently came across another article about “validation” and SEO. These articles always baffle me because most of what is in them doesn’t have much to do with validation or SEO. Even some of the responses in SEOmoz’s ranking factors seem to show some variation in what “validation” means.
It seems to me that people may be using “validation” to mean “coding errors” or “web standards” or “best practices.” What they are missing is that validation is only a test of coding errors and is not the same as web standards, which is not the same as web coding best practices.
In addition, there are many standards-aware designers who would like to think that standards matter more than they do for SEO, and a lot of confusion around what does and does not make a difference. As always with SEO, there is a lot of misinformation floating around out there. Let’s set the record straight! I’ll tell you right now that I don’t have the answers to most of these questions. Instead, I’m asking Mozzers to help me with the answers.
What is validation?
Validation refers to a service offered by the W3C which checks your web page for compliance with their standards. It is comparable to a spell checker – it checks your page against a known set of defined rules.
If a page is valid, the validator will show a page with a green bar saying that “This page is valid” according to the standard it was developed with (HTML or xHTML, transitional or strict). If it is not valid, it will show an orange bar followed by a list of errors. Validation is simply a test: does this page pass? Yes or no. If not, how many errors are there?
As an automated tool, the validator can’t possibly check for qualitative problems, just as a spell checker can’t tell if you’re using the words properly (web standards) or if your article is well written (best practices). A page can be valid but not standards compliant or coded according to best practices, just as a written article can have good spelling but poor grammar and writing style.
Does it matter for SEO?
Even as a standards advocate, it’s obvious to me that search engines don’t and shouldn’t care whether a page validates or not. They’re looking for the best information for people – certainly whether a page passes a validator shouldn’t have a bearing on that. They should also recognize that a simple human error, such as forgetting to close a tag, could make a page invalid. As Todd Malicoat suggested in the SEOmoz ranking factors, Google isn’t going to waste resources running the validator on every site.
Do they care if there are errors? Well, since we’ve established that they wouldn’t be running a validator on every site, then they probably don’t. However, validation is a test of well-formed HTML – do they care about that? Some of the references on this topic have suggested that a lot of unclosed or improperly nested tags could hinder a search bot when crawling a page. Google’s webmaster guidelines state that you should “check for broken links and correct HTML,” but do not elaborate on what that means.
Regardless, this is a larger issue of web standards and well-formed HTML and not one of validation per se. In order to avoid confusion we should be talking about “well-formed HTML” or “HTML coding errors,” not “validation.”
What are web standards?
There are many things that are covered in the W3C standards that are not tested by the validator. One of the most important is semantics: that HTML tags should be used for their proper purpose. Paragraphs are paragraphs, lists are lists, headers are headers, and tables are for data and not for page layout.
A related aspect of web standards that is not fully tested by the validator is the separation of presentation from structure and interactivity. That is, keeping the CSS and Javascript out of the HTML. There are many reasons to do this, including better accessibility and easier maintenance. (This is partially tested by the validator for certain doctypes that don’t allow inline event handlers and presentational HTML such as tags).
Does it matter for SEO?
It’s pretty clear to me that search engines wouldn’t care that much about web standards either. However, it could be that they have some things in common with things that search engines would care about.
SEO Experts: I’ll turn this one over to you.
- Does semantic mark-up matter for SEO? Could it matter more in the future?
- Is there any SEO advantage in using CSS instead of tables for layout?
- Are there any SEO benefits in separating presentation, structure, and interactivity (e.g. keeping the CSS and javascript completely separate from the HTML code)?
- Could web standards be used as a quality indicator?
What are web design best practices?
Web design best practices include web standards but go beyond to include general methods for coding web pages. This would include things like simplifying mark-up, re-ordering source code, accessibility, cross-browser and cross-device compatibility, etc. All of these are good things to do with a web page, but they have very little to do with validation.
Does it matter for SEO?
It seems to me that accessibility for humans and accessibility for search engines have a lot in common. If a disabled person using a screen reader or text-based browser find their way around your site, then bots will be able to as well.
More questions for the SEO experts:
- Do search engines ever look at browser compatibility? It makes sense that they wouldn’t want to list pages that don’t work for people, but do they actually do this?
- Does too much code or too much presentational mark-up affect crawling in any way? (code-to-content ratio)
- Does source code order matter?
- Are there any ways in which the way a web page is coded impact SEO?
For more information on web standards and some useful links, check out Robert Nyman’s comprehensive explanation of the term “web standards”.