Guide to using the W3C HTML validator

Although you can do everything that I describe without them, if you don't already work with multiple tabs in your web browser, this is an excellent time to start. The same comment applies to a good text editor, with line numbering and syntax highlighting. I like Textpad.

First catch your HTML. What follows is only of use once you have at least one page of your own work up on the internet. It can be just a little page! Don't panic when you see the results of the following....

The first time you do this, you'll probably get lots of "errors". If you try the same thing, but using this page's URL, you can see what happens once you fix everything.... that wide stripe of green becomes like a drug.... it is so nice when you finally get it!

So... how do we fix your page so that you don't get any errors? The following will be fine for many simple web pages in English. You may have to make adjustments for some circumstances, but the following will make a good starting point.

Before I go farther, I need to explain that I create my web pages "by hand". I'm typing this text into a text editor. If you use some "all singing, all dancing" wisiwig html creator, it may be doing things under the surface which aren't quite right... and may be putting them back in every time you run it. At least as an experiment, try working on one of your simpler pages with a text editor for a bit. If you want to use your wisiwig html creator for getting something started, fine. If it creates legal code, fine. But if you are having problems, try the following with a simple text editor. Textpad offers a free trial, or use Notepad, which comes with Windows.

First, make the first line of your page be EXACTLY what follows....

<!DOCTYPE html public
"-//W3C//DTD HTML 4.01 Transitional//EN"

In general, HTML tags should be entered in lower case, as in "html" above. However, it seems that DOCTYPE has to be in upper case. ("Capital" letters).

Second: Take out the old tag that you had at the start of your code. (Leave the </html> at the end of your page in place.)

Third: Somewhere in the page's header section, just before the </head> tag is as good a place as any, add...

<meta http-equiv="Content-Type" content="text/html;charset=utf-8">

(An aside: It is slightly surreal writing this tutorial: Much of the content of the page is drawn from the page itself!)

Be sure to save (with your text editor) the changes you have made.

Be sure to upload the new version of your webpage to your server.

Run the validator again. If you're working in multiple tabs on your browser, you only need to go back to the right tab and hit "reload".

A better result, I hope? But, probably, still errors. Not only does the validator spot errors, it offers lots of help on how they may have arisen, might be fixed. It is also worth reading their "tip of the day" which is part of the reward of getting all the errors out of a page.

When you've used the validator for a while, you'll be able to skim through the report, spot things, fix a bunch of problems at once. For now....

Consider just the first few errors in the list. Note that the validator tells you which line of the file they are on. You don't need to hunt through your file by eye! (As in Delphi, Pascal, and probably other language programming, sometimes there is nothing wrong with the "error line", but somehting you've done earlier is making it look wrong.) Make some changes in your web page. Re-save on your local machine. Re- upload to server. Re- run validation.

I hope you've fixed some of the errors? If not, try again!

When you have fixed some of the first errors found by the validator, you will often find that many other "errors" farther down the page go away.... this is why I said not to panic when you were about to see the first report about your page.

That's it! Pretty painless, and by using the tool to keep your HTML correct, you are contributing to a web that works... not to mention increasing your chances of getting your pages indexed properly by Google and the like.

Doing your spellchecking first guards against the chance of introducing an HTML error during your spelling mistake editing.

The same nice people who offer you the simple, free HTML validator, but they offer similar services which will check that none of your links are broken, and will check your CSS is valid. (The CSS can be embedded, the beginner's simple answer, or in separate sheets.

Like the above? There's information about some similar things farther down the page, but first a little rant....

"The world" is working towards open standards... and agreed set of rules about what is "legal" HTML. (A similar effort is being made in other areas... document formats, java, etc.

A certain large corporation based near Seattle doesn't much like us leaving it's fold. Fine! I'm a great fan of capitalism, as it happens. And no fan of the inept or worse governments that seem unable or unwilling to keep that corporation in check. Thus the corporation gets suspected of doing things like putting little "extras" in the HTML it's HTML authoring program generate which only work properly with the corporation's browser.

Don't stand for it! Support the open HTML standards by using the validator.

Complain to your elected officials when a website from a government agency won't work properly in Firefox or Opera.

Complain to your elected officials when their agencies send lots of YOUR money to for-profit corporations instead of getting behind the Open Office initiative. Yes... that will cost some money in the short term, but if MS manages to kill off the alternatives, do you think the MS products will become cheaper? And do you really think that it is a coincidence that MS's internet browser had tabs added shortly after Firefox and Opera offered them? Would we have been given tabs in the MS product otherwise?

Rant over... for now.

You may have come to this page from one or the other of the following... in which case, just close it to get back to where you came from.... but if you liked the information above, there is similar material at....

My page highlighting some services available on the web.

My page giving some help with publishing on the web.

Why does this site cause a script to run? I have my web-traffic monitored for me by eXTReMe tracker. They offer a free tracker. If you want to try it, check out their site
Click here to return to main page for Helpful Hints.
Click here to go to the site's main index... Helpful Hints is just one corner of the site. You can search the site from the main index.

Here is how you can contact this page's editor.

Valid HTML 4.01 Transitional Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org