HTML validators are programs used to check and report on syntax errors in HTML codes.
Unclosed tags, illegal attributes, and other errors can make your Web pages garbled and ugly. Even if your favorite browser shows your pages properly, don't relax, some other browsers can render possible errors in different ways, producing unexpected results.
So it's time to validate your code. The best way to do this is to just use automatic HTML validators. Some of these are programs you download and run on your home computer, others offer a Web-based
The WDG HTML Validator is similar in many ways to the W3C HTML Validation Service. Most of the previous differences between the two validators have disappeared with recent development of the W3C validator. The errors reported are the same in virtually all cases. However, some minor differences may arise:
*
The WDG HTML Validator gives warnings for valid but dangerous HTML: unclosed start-tags (e.g., <p><img src=foo alt=bar</p>), unclosed end-tags (e.g., <p><em>foo</em</p>), empty start and end-tags (e.g.,
Thus far, you've read the HTML 4.01 and XHTML 1.0 documentation and you understand their relationship. You have successfully converted a few documents to XHTML 1.0. So, how do you know that your documents are really XHTML 1.0 compliant?
The easiest way, as stated earlier, is to use "xmllint." It was distributed with later versions of libxml, which can be obtained from xmlsoft.org. Once properly installed, you can use xmllint to check your work. Your command line entry will look like this:
xmllint --valid --noout mydoc.html
If you receive error
Thus far, you've read the HTML 4.01 and XHTML 1.0 documentation and you understand their relationship. You have successfully converted a few documents to XHTML 1.0. So, how do you know that your documents are really XHTML 1.0 compliant?
The easiest way, as stated earlier, is to use "xmllint." It was distributed with later versions of libxml, which can be obtained from xmlsoft.org. Once properly installed, you can use xmllint to check your work. Your command line entry will look like this:
xmllint --valid --noout mydoc.html
If you receive error