by Mike McKeown
Webmasters constantly are told they should validate their code for answers using the W3C Validator. Many websites even have buttons at the bottom of their page to prove that their code is valid. This got me thinking “how do the web’s most popular sites stack up?” The results may be a little surprising.
- Myspace.com
One of the web’s most popular social networking sites has long been criticized for the ugliness of code on user’s profiles, the amount of validation errors it causes, and the sheer ugliness of some profiles. But that’s not the only problem. Their site shows 91 errors and 61 warnings. - Facebook.com
The world’s most popular social network yields 37 errors. Some flagged errors don’t appear to be real errors though. - Twitter.com
A hefty 79 errors for their homepage. - Google
Google’s extremely simple homepage has 45 errors and two warnings. I am not surprised by numbers 1-3 on the list, but I expected Google to be flawless. - W3C.org
Passes. Which is good, because if it didn’t, I’d probably go have to punch someone.
You would expect the world’s top trafficked websites to take a little more time validating their markup, right? Well I guess not. It is important to remember though when you have multiple scripts placing dynamic content on a page it is extremely hard to avoid errors.
Also, a lot of times errors are a result of the wrong Doctype, so make sure that is right on your page.
You should always make sure you validate your code so that your site works properly on all devices all the time. It can be hard when you have multiple scripts running on your website, but it will be worth it. Sites with valid code also tend to do better in search engines.
March 19th, 2010 on 9:20 am
I have to say I was very surprised by the results, except for Myspace… I expected them to be bad. It does make some sense though, because when you have a bunch of different scripts running on a page it can be very hard to be compliant, vs. a static page which is easy to keep standards-compliant.