Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is W3C validation important? [duplicate]

Possible Duplicate:
How important is W3C XHTML/CSS validation when finalizing work?

I read about validation from many sources and most will say always validate your web page. It is important that your page validate.

I understand the concept. But my site does not "validate", yet it works across every major browsers, does not produce errors in those browsers and looks correct in all browsers.

This is an example of an error I get

Error Line 38, Column 28: document type does not allow element "h3" here

var $jsuccessmessage = "<h3>We will be in contact soon. </h3>"; // success mess…

The element named above was found in a context where it is not allowed. This
could mean that you have incorrectly nested elements -- such as a "style"
element in the "body" section instead of inside "head" -- or two elements
that overlap (which is not allowed).

So I ask, how important is it that I correct these errors and do my best to produce fully validated code?

Note: I am using XHTML 1.0 Transitional for my doctype.

like image 714
L84 Avatar asked Aug 01 '11 04:08

L84


1 Answers

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.

like image 111
mu is too short Avatar answered Nov 14 '22 21:11

mu is too short