HTML Coding
Validating HTML Code
By Laura Lemay
I have a vision of a future where only one version of HTML is supported by all the world's browsers. Call it "Uber-HTML." This version of HTML would be able to produce any effect a page designer could want, consistently across browsers. It would be small, easily downloaded, yet viewable on any computer system at any screen width.Uber-HTML would be cooperatively produced and designed, making it easy and sensible to use.Uber-HTML would be easily generated from every word processor, page-layout tool, and presentation designer on the market, so pages could be automatically created without errors, illegal code, or browser-compatibility problems.
Uber-HTML is a long way off, and it may never happen. In the meantime, there is something that makes the coding process easier: HTML validation. HTML validators tell you what you're doing wrong in your pages, whether you're using nonstandard tags, forgetting to close your tags, or misspelling words.
Why Validate?
The first question everyone asks about HTML validation is, Why bother? Many people simply hack around until the HTML comes out right: Change the code, preview the result, and when it looks right in the browser, publish it. If the pages look right in your browser of choice and no one's complaining, why validate them?
Validating your HTML is important because browsers are extremely forgiving of errors in code. Browsers don't tell you when you're doing something wrong they just try to work around it.