Organizations often need to perform some kind of a cost/benefit analysis when they want to implement something. If the benefits or expected future returns are greater than anticipated costs, then it's usually a sound business decision to move forward with implementation. If expected returns are going to be low, then it's unlikely that the implementation costs can be justified.
The majority of web developers are likely to find themselves performing a cost/benefit analysis on validating source code at least once. In larger organizations, with multiple development nodes, not all developers or programmers are going to adhere to the W3C (World-Wide-Web Consortium) specification guidelines for HTML code. More often than not, the smaller errors in HTML code go undetected, since many modern Web browsers have the ability to handle non-critical errors pretty well. Still, in using the HTML Validator on your favorite Websites, you will notice that many of them will contain invalid HTML code. Perhaps even all of them use invalid HTML code.
So, the questions are...In short... No. However, this is no excuse for invalid or sloppy HTML code. We absolutely always recommend that HTML code is written as per the W3C Markup guidelines, because browsers use these specifications in reading the content. Invalid HTML code may cause critical display errors in some browsers, and you won't know without testing every single browser, which is a huge undertaking.
Nonetheless, there is a vast number of Websites with extremely poor and invalid HTML that continue to rank well in organic search results, for extremely competitive terms. I searchde on Google for a number of very competitive terms and tried to determine how many of the top ranking websites had invalid HTML code. The answer is... a LOT. Take a look at the top ranking websites for "mortgage", an extremely competitive term:
![]()
Google Search for "Mortgage" (Click to Enlarge)
Of these 10 Websites, 9 had HTML errors. Wikipedia was the only Website that was free of HTML errors. Use these links to the W3C HTML Validator to see the errors for each of the top 10 Websites:
There are many websites with very valuable content that do not comply to HTML specifications. Accordingly, Google needs to make sure that this content can be found, even if it's not absolutely perfect! Since most Web browsers will be capable of rendering pages with small HTML errors, it is still valuable. This is not to say that Google or any other engine actually favor invalid code. All things being equal, valid HTML code is likely to be favored. The question is... is it worth the effort?
This is the hardest question of all. Ideally, the development process should require that all HTML code is valid before it's put into production use. In reality, this is generally much more difficult to accomplish, and one must perform a cost/benefit analysis for "fixing" invalid HTML code.
Sometimes it helps to classify HTML errors into varying levels of urgency or criticality. Granted, this is a subjective practice, but it can help in determining the urgency. HTML code errors that have the potential to effect browser rendering should be put at the top of the criticality list. These would include missing or mismatched HTML, BODY, TABLE, TR, TD, DIV tags, etc... HTML errors of less criticality might include missing ALT attributes on images (but they should be used for SEO), and other such trivial errors.
In general, our recommendation is to resolve all of the critical errors, since those are most likely to impact search engine readability. If a search engine can't render content correctly, then it won't be ranked properly.
Ultimately, it's a judgement call. If your pages are absolutely full of critical errors, you should get them fixed. If you've got smaller, less critical errors, then you might not get much boost for your efforts.