How important is W3C XHTML/CSS validation when finalizing work? [closed]

Question!

Even though I always strive for complete validation these days, I often wonder if it's a waste of time. If the code runs and it looks the same in all browsers (I use browsershots.org to verify) then do I need to take it any further or am I just being overly anal?

What level do you hold your code to when you create it for:

a) yourself b) your clients

P.S. Jeff and company, why doesn't stack overflow validate? :)

EDIT: Some good insights, I think that since I've been so valid-obsessed for so long I program knowing what will cause problems and what won't so I'm in a better position than people who create a site first and then "go back and fix the validation problems"

I think I may post another question on stack overflow; "Do you validate as you go or do you finish and then go back and validate?" as that seems to be where this question is going



Answers

For understanding why validation matters, it is needed to understand how a browser works at its different layers, and also a little bit about the history of web from the perspective of web browsers.

The HTML you give to a browser is interpreted by the browser following the DOM, an application programming interface that maps out the entire page as a hierarchy of nodes. Each part of that tree is a type of node containing different kinds of data. DOM (Document Object Model) was necessary because of the diversity of HTML pages that early web browsers (Netscape, IE...) implemented to allow alter the appearance and content of a web page without reloading it. For preserving the cross-platform nature of the web, W3C wanted to fix the different implementation of those browsers, proposing DOM.

DOM support became a huge priority for most web browsers vendors, and efforts have been ongoing to improve support on each release. So, it worked.

DOM is the very basic step with which a web browser starts. Its main flow is:

  1. parsing HTML to construct the DOM tree
  2. render tree construction
  3. layout of the render tree
  4. painting the render tree

The step 1 gives the content tree, with the tags turned to DOM nodes. The step 2 gives the render tree, containing styling information.

So, why validation matters: because content tree and render tree are the basis from which the web browser start its job. The most they are well defined, the better for the web browser.

Ultimately, the DOM is also the basis for your JavaScript events. So, its validation helps to the interaction layer too.



Except that the validators themselves are so positively anal, when they flag an error or warning whenever a -moz- or -webkit or -o- i.e. a browser specific qualification term is used. also they want you to specify 0px rather than 0 or other units Zero is Zero whatever units the validator wants to check it against!

just try validating the WordPress twentyeleven style.css it throws 140 odd errors which are all of the nature above or the validator is recovering from parse errors

The validators are useless if you cannot sort the wheat from the chaff!!!

We need validators that recognise browser specific qualification terms!

By : DavyB


For me, I feel like I've done a good job if my code validates. Seeing the green check box on the w3c pages just makes me slightly giddy. As for group b, They usually only care that it looks and works the same across browsers. They only place I've found that this is not true is the government sector. They require complete validation not only with the w3c but also passing ADA tests (basically how does it sound with a screen reader).

p.s. when I say government sector, I mean specifically the state of California and a few counties inside it. I have had no ther experience with other government groups besides them.

By : icco


This video can help you solving your question :)
By: admin