Html Validation ... Why ?

What is HTML validation?

Html is a language and like any language it has rules. Validation checks to see if you followed those rules. OK, you say my site shows just fine, so what's the problem ?

I took on the W3C " World Wide Web Consortium " , who sets the standard for such things as a challenge, just to see, if I could do it. The first time I ran a validation check I was stunned! But not too dis-heartened, as even the W3C says about 99% of websites fail just this way.

Ok so why do it , if everybody is non standard ?

That depends upon how important that it display right is to you , not only now, but later when browsers get more demanding. Errors may be no problem, in your browser, but might be dreadful somewhere else. I thought I was doing good by building in Netscape, and previewing in IE, to cover the major browsers.

And I found I was right, but _there's always a but in that kind of sentence_ but, I found that the two systems are NOT completely compatible with each other. Each has things only IT recognizes. Why ? I have no idea, but they are not. So to build a page that is compatible to them all, takes work.

Ok, again, why? Because due to these " errors" things may not display on other browsers correctly, or worse, in some cases, not show up at all ! But most browsers know this and make allowances. They wouldn't stay in business for long if they failed to render pages, errors or not.. Ok so again then ,why validation ?

Search engines ! Their spiders are not as forgiving and they have to understand what you are trying to say. Where the tags are, where the key words are and so on.

By the majors.

The doc type,( tells both browser and engines what kind of page it is )

This was developed into an art form by the W3C , they are the first thing on any page, or should be, they tell both the engine and the browser what sort of directions to view the page with. These are the three most common.

DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//

Somewhat mangled to display here

Now I had the doc type on the head of each page but my editor did it this way
doctype html public-//w3c//dtd html 4.01//en

Looks the same ? Its not, the doc type is one of those tags that must be in uppercase, as I discovered.

Character set:

This tells it what text to display, in this case Western english ,mine said this:
meta http-equiv = Content=text/html; charset=iso-8859-1

Nope, it does not understand this correctly, it is assumed, thank goodness based on contents.

Correctly is like so:
meta http-equiv = Content-Type content=text/html charset=iso-8859-1

Such a tiny change, but this makes the difference between having a character set and not having
one as far as the browsers are concerned.


Again what type,
script language = javascript type=text/javascript
Correct VS
script language=javascipt

And the term " language" is being phased out. Also , lack of noscript tags that tell the engine to ignore this.

They need this information in order to index the page correctly. And to be blunt, they are far behind most common browsers. They understand a limited set of directions. And some of these " errors" can make them stop in their tracks.

The most common "errors" in html, are unfinished tags, like so: <center>..< /center>.. meaning start doing this, stop doing this. Each start, must have a matching stop. A lot of WYSIWYG editors don't do this.

Table errors, most common, mis naming the valign to center instead of top, middle, bottom etc. Or no summary, which is required for accessibility, summary= " what's in the table" which visual browsers don't see, but text readers do.

Articles that are not in " " marks, like font sizes, almost all number types such as line wide=4 the 4 should be "4" to differentiate it from text. There are a wide number of programs that will help " fix " such errors, like Html Tidy, but even they have issues, so nothing works best like time and your own eyes.

And here's another bonus, I discovered, they do tend to load faster, I assume, since the browser does not have to figure out what to do, there is not as much of a time lag, as you have given it complete and accurate directions on how to display the page. Now, do you have to have it W3C perfect ? No, but where possible, following the guide lines is in your best interest.

More soon

Return to how to design a website