Validation, how important?

News Feed

The question that I want to ask here is how important is validation. Do we make pages valid at all costs? or can do we ignore some errors when we know they are safe? Are there more important things than validation? Should it really be the first thing that gets pointed out when someone asks for a review on their site?

Let start by looking at the code below, it is very ugly and most people would deem it invalid instantly. Bug if you ask the validator it is valid. There are warnings that browser may not interpret it right though, but that is the browser fault, not because it is invalid.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<?page break>
<html<head>
<title/page/
</head>
<body>
<p>
something <![CDATA[ <body> ]]>
</>
</body</html>

Even if those warnings were fixed, the page would still not be displayed right. And then again there are pages that are valid, but the validator says are not. One case is when you use namespaces in XHTML. Also not closing p tags is valid, but I have seen this.

<p>
<h3>A heading</h3>
This is valid but does not give what is expected by inexperienced users.

The person is unaware that putting a h3 in a p tag is invalid, so the browser closes the paragraph before the p. If they did close the p like this they would get an error.

<p>
<h3>A heading</h3>
This is valid but does not give what is expected by inexperienced users.
</p>

So what are well really aiming for? I think we are after pages that are well structured and will be interpreted how we expect them too in all browsers. If I put value="10" on a div, it is not valid. But so what, I want my script to be able to find that. How ever if it shows I have not closed a tag or something, it should really be fixed because it is very likely to mess how the page is laid out. And so often such errors are very hard to pick up on.

I also think there are quite a number of rules of good practice that should be followed that the validator does not pick up on. Examples would be closing the p and li tags for the reason given in the example above. Putting width and height and good alt text on every image amongst other things.

So the point is the validator is a tool to help me with the design process of making a site, and not and end in itself like many try to make it.