Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do major websites not pass W3C validation properly? [closed]

In an attempt to understand if W3C validation can assist better DOM rendering or if it is just a standard for HTML coding, I tried to validate major websites but all of them fail with some errors.

Here are typical examples:

  • google.com 36 Errors, 2 warning(s)

  • facebook.com 42 Errors

  • youtube.com 91 Errors, 3 warning(s)

  • yahoo.com 212 Errors, 8 warning(s)

  • amazon.com 510 Errors, 138 warning(s)

When major websites do not seem to spend enough time for W3C validation, is it needed to spend time to do so for small- and medium-sized websites?

like image 359
Googlebot Avatar asked Mar 26 '12 10:03

Googlebot


People also ask

How important is W3C validation?

W3C validation helps you to get better rankings in search engines (SEO). Errors in your code can affect your site's performance and make a big impact on your site's SEO. Search engines check the HTML or XHTML code of your website when searching.

What causes validation error?

Validation errors typically occur when a request is malformed -- usually because a field has not been given the correct value type, or the JSON is misformatted.


1 Answers

Validation is a sore issue. In XHTML days (pre html5 doctype ubiquity) it was almost impossible to validate a complex layout against the strict DTD published by the W3C. I think you could probably point fingers at IE for being the prime culprit, as so many totally non-standard hacks were needed to make it behave in a reasonable cross-browser way, and IE was and is the most-used browser on the planet. It is to be lamented that MS, instead of following the lead given by webkit and gecko engines, have decided to add yet more browser extensions and hacks to muddy the waters, instead of going for plain adherence to the 'standards'.

We all know that if time were not an issue, we as developers could create pages that validate, but in practical terms, as the others have pointed out, validation ends up being a helpful tool not a defacto objective. If a client demands validation, then there is a cost involved, and that has to be explained - managing the expectations here is very important.

The html web advanced in very short time from being a very simplistic semantic text layout engine to fully dynamic applications running inside the browser, and the validation tools simply have not kept up with this. I'm not even sure they can, given that browser technology is advancing daily, across a thousand or more different platforms.

So - rounding up, it's a tool to be used by developers, but your own personal ability is what will determine if the project is fit to purpose or not. Having an icon or green 'ok' box in a validator is absolutely not going to define if a project fits this definition or not.

like image 87
dmp Avatar answered Oct 17 '22 20:10

dmp