Next: Validation services
Up: HTML validation tools
Previous: HTML validation tools
Weblint is quite a straightforward Perl program that
checks the basic structure of HTML documents for problems. No
particular operating system environment is necessary and the program
should work on any system with a Perl interpreter. It won't actually
correct erroneous syntax, but produces a comprehensive error report,
enabling the user to enter corrections manually.
Weblint puts each HTML document through the following tests:
- It checks that the file contents are enclosed in an HTML
element and that there are HEAD and BODY elements.
- It looks for a TITLE in the HEAD element and
outputs an error message if one is not found.
- It checks that elements do not overlap, for example:
<B><I>..</B></I>.
- It checks for the presence of obsolete elements, and reports on
them.
- It checks for the repetition of elements that should only appear
once within a document.
- It searches for unclosed elements.
- It checks for illegally nested elements.
- It examines all image tags to see if they have a description,
specified with the ALT attribute, for use by non-graphical
browsers.
- It searches for mismatched pairs of tags, for example:
<H3>...</H4>.
- It performs context checks on tags that are required or only
permitted within a certain element.
- It checks for the non-occurrence of attributes in tags where you
would normally expect to find them.
- It reports the occurrence of markup embedded within comments,
since some browser programs object to this.
- It can be configured to check that all tags are in either upper
or lower case, according to the style conventions used.
This test is not enabled by default.
- It can be configured to object to the use of the word `here' in
anchor text.
Each problem encountered is reported with a single-line error message,
as shown in the following example. The number enclosed in brackets
after the filename refers to the line number within the document file
where the error was encountered:
test-file.html(1): outer tags should be <HTML> .. </HTML>.
test-file.html(1): <TITLE> can only appear in the HEAD element.
test-file.html(7): bad form to use `here' as an anchor!
test-file.html(141): unmatched </B> (no matching <B> seen).
test-file.html(244): bad form to use `here' as an anchor!
test-file.html(265): <XMP> is obsolete.
test-file.html(357): IMG does not have ALT text defined.
test-file.html(-): expected tag(s) not seen: HTML HEAD BODY
Each of the checks can be enabled or disabled by means of a simple
configuration file. The program is fairly straightforward and could
quite easily be extended to check for other problem areas.
Next: Validation services
Up: HTML validation tools
Previous: HTML validation tools
Spinning the Web by Andrew Ford
© 1995 International Thomson Publishing
© 2002 Andrew Ford and Ford & Mason Ltd
Note: this HTML document was generated in December 1994 directly from the
LaTeX source files using LaTeX2HTML. It was formatted into our standard page layout
using the Template Toolkit. The document is mainly of historical
interest as obviously many of the sites mentioned have long since
disappeared.
|