How do I validate my Web / HTML pages?
- 0
- Add a Comment
Dave, an easy question: How do I validate my Web pages and end up with one of those nifty “xhtml 1.0 verified” graphics for my page?
In the beginning of the Web, web browsers were lazy and HTML coders were sloppy, trusting that if things ‘just kinda worked alright’ that it was time to move on to the next page. As the HTML language and its descendents began to evolve into ever-more-powerful systems (e.g., XML, JavaScript, CSS), it began to be a problem that sloppy HTML was so pervasive.
Worse, the World Wide Web Consortium published a formal, but almost incomprehensible specification that detailed exactly the valid and legal HTML language structure for each generation of HTML.
Enter validators.
The idea of a validator is that you can feed it the address of a Web page, specify exactly what ‘flavor’ of HTML you’ve written it in, and it’ll then parse and analyze the actual tag structure to see if it’s all legal. There are a surprisingly large number of different flavors of HTML too, but the newest and most important is called XHTML, a slight twist on HTML 4 that enforces XML-based syntax.
In a nutshell, this means that you can’t do something like…
