Catch errors before they go live by linting your HTML with Perl
Catch errors before they go live by linting your HTML with Perl
When you’re developing HTML pages there is no early warning system for coding errors — any error in your markup will usually be silently ignored by the browser. The simplest solution, then, is to check (or “lint”) your HTML before putting it live. And that’s where a useful little CPAN module called HTML::Lint comes in. This Perl module, built atop the popular HTML::Parser module, is designed to verify your markup against W3C standards and point out errors that could cause it to “break” or render badly in client browsers. This download explores some of HTML::Lint’s capabilities by using it to check example HTML pages and display the errors it finds.
What is the worst HTML error you’ve accidentally let go live on a Web site?
This download is also available as a TechRepublic article.