Hacker News new | comments | show | ask | jobs | submit login
Ask HN: Why do many major sites fail W3C's markup validation service?
7 points by nomolurcin 1430 days ago | hide | past | web | 5 comments | favorite
Pretty much every major site, including Google and Hacker News, does not pass.

One reason my stuff usually fails is due to empty elements. For example:

  <div class="clear"></div>
in order to clear a float or something. There are better ways to do this but nothing is more convenient than riddling your markup with non-semantic garbage. If your website renders as expected in all major browsers, I say don't worry about it.

Also, if it renders like crap in IEX, don't worry about it. IE users are used to a horrible experience online. They see broken websites all the time and just assume their computer has a virus. And it probably does. It's just not causing their poor web experience.

Because it renders acceptably in common browsers, and that's what actual users care about. If a website does not validate, only an extremely tiny subset of users who test websites in validators is going to care about it.

Google's home page is now huge with the javascript and Google+ additions - but it used to send invalid HTML missing end tags on purpose. Browsers still render unclosed tags when reaching the end of the response, and therefore they could send a smaller, faster HTML page by leaving off closing tags.

Modern browsers are tolerable with markup not being perfect.

With me, as long as it works, I don't care.

The problem is that "as long as it works" is vague. All browsers? ALL? All except IE7? IE6? iOS4?

I think that says more about the validation tool rather than the sites failing it.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact