Validating your html
Validating your HTML pages is important, but it also can be frustrating and annoying. It's important both for your readers and for accurate search engine indexing or contextual ad display: if your HTML is broken, you may not get the impact or results you expect.
It's not enough to "validate" by looking at the page in your own browser. Browsers forgive a lot of sins and will do their best to display even very poorly done pages. However, your browsers tolerance for glitches and mistakes may be much different than mine and therefore what I see may be quite a bit different than what you intended (unfortunately it is sometimes very different even if your HTML is perfect, but that's a different topic). A search engine spider indexing your pages may be confused without strict HTML syntax, so it really becomes necessary to "do it right".
I used to use the Firefox toolbar extension Web Developer, but you can just go to http://validator.w3.org/ and enter your pages directly. You'll need to put a DOCTYPE Declaration on your pages for that to work. If your pages have problems, you'll get a listing of the errors.
Don't panic if you get dozens of errors. One simple problem at the beginning of the page can trigger multiple errors as the validation continues. It can sometimes be difficult to see the original problem, but if you fix that, all the rest of the "errors" can magically disappear. If it's really difficult, just excise sections of your page until the errors go away, and then put everything back slowly so that you can narrow down where the mistake is.
Another impediment comes from embedded scripts: the validator sees the result of the scripts, which throws off the line numbering. You'll want to check off the "Show Source" option to help with that.
See Tidy also.
Got something to add? Send me email.
(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version
Increase ad revenue 50-250% with Ezoic