Is W3C validation important? [duplicate]

爱⌒轻易说出口 提交于 2019-12-05 07:51:33

Proper markup is pretty important. Just because some invalid markup works in all of the current versions of the browsers you care about doesn't mean that it will keep working in future versions. As long as there is some competition in the browser market, the browsers tend to get closer to the standard and non-standard HTML has a higher chance of failing in interesting ways.

Sticking to the standards helps you future proof your work and it helps you build good habits.

Consider how many large organizations are still stuck using IE6 (yes, 6). Why are they stuck with it? They are stuck with it because they had a suite of critical applications built that only work on IE6 due to non-standard HTML, CSS, JavaScript, ActiveX, etc. These poor people are stuck with a pile of creaky ancient applications that can't be updated without paying for a complete rewrite. If they built to standards in the first place (with hacks and kludges to account for the ever present non-standard behavior), it would be easier to move forward a little bit at a time.

Everything you build that is non-standard anchors you in the present and leaves you stuck in the past next month. There's no good reason to wear concrete boots when surfing and even less reason for your clients to wear them.

I was reading Steve Saunders' book on high performance website. He mentions many tips & tricks that offend W3C validator but speeds up the page and in turn delivers a better user experience. Better user experience will bring me better revenue so I, as a business owner, would love better user experience. On the other hand, incompatible, standard or best practices defiant systems demand more maintenance and attention. So I, as a developer, would love a standard compliant page. Choose your position wisely and you will find a middle path. Please do not take my comment as standard compliant pages provide lesser good user experience. There is no silver bullet as they say. I dont know them but they seemed to be right.

You should use W3C conventions as much as possible and these convention are going to be the most cross-browser compatible. That being said not all browsers implement W3C standards properly or completely. You will find that you have to break compliance to adjust for these quirks. It is not as bad as it used be, as the main culprit, Internet Explorer has been more accepting of standards.

The importance of validation is a matter of personal opinion. Sites don't need to comply to W3C standards to work across browsers.

It's kind of like driving, some people don't obey the laws and get away with it. Eventually it will catch up to them. It's much the same with validation; the risk of invalid code is poor SEO performance, future browser incompatibility, etc.

Having valid code is just "the right thing" to do, and is encouraged by most developers that I know.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!