Validation and Errors [en]

Although neither do validate, we should not judge a valid page with errors as harshly as a page of tag soup.

For some time now, I have been meaning to clarify the distinction I make between markup which is valid with errors and that which is outright invalid. Yes, I know, in both cases it does not validate.

Take a page which would normally validate as xhtml strict, and insert some are errors into it, like an unclosed tag, an unescaped ampersand and maybe even (oh horror!) a couple of target="_blank" attributes. It does not validate.

Take tag soup. It does not validate either.

But there is a difference between the two, you’ll have to admit. Which is why I suggest calling one of them valid with errors and the other one outright invalid (or just plain invalid). This would also encourage us standards evangelists to be a bit more appreciative of the efforts of those who have gone through the trouble of cleaning up their markup and bringing it nearer to validation, compared to those who just don’t give a damn. As seen on various mailing lists and forums, they are often both greeted quite bluntly with the same “your page doesn’t validate!”

For me, the difference is the same as the one between a well structured text with correct grammar but a few spelling mistakes (it can happen to anybody, even to English teachers!) and a clumsy story with no plot or ending, filled with spelling mistakes, and approximate grammar which makes certain sentences unintelligible.

That might also help us respond to “anti-standards” people who go around sticking our pages in the validator and then say “Hah! it doesn’t validate, look, 50 errors, they’re as bad as we are!”

I’ll say it again: validation (with zero errors) is important. Your PHP or XML parser doesn’t care if there is one or 100 mistakes in your page: it can’t parse it. But we are human beings, and should give credit where credit is due. A “valid page with errors” is not as big a crime as tag soup.

2 thoughts on “Validation and Errors [en]

  1. Tu parles du fait pas de la démarche 🙂

    invalid est invalid. une ou 100 erreurs comme tu le dis. Je vois plutôt la démarche comme
    quelquechose d’encourageant.

    Cela ne sert à  rien de valider pour valider. Une page peut-être valide et non conforme par
    exemple. Il faut que j’explique cette notion.

    C’est tout le propos du texte que l’on a Ă©crit dans la QA: le Step by Step.

    Tu as les bons arguments mais le mauvais axe d’explication. 🙂 je pense que tu peux amĂ©liorer
    un petit peu le chouillat du texte 🙂

  2. Hi
    I’m loving this blog. Very informative. I’d like to get access to your article on – afraid to
    say that I use it all the time. I would like to see the reasons why I shouldn’t. Clicking on
    your link took me to the french version and I am afraid to say that I am not well versed in
    french. How can I reach the english version?

Leave a Reply

Your email address will not be published. Required fields are marked *