Binary package “libhtml-lint-perl” in ubuntu precise
checker of HTML errors in strings or files
HTML::Lint is a pure-Perl HTML parser and checker for syntactic legitmacy.
.
The "weblint" script - provided in the separate package "weblint-perl" -
is a wrapper around the HTML::Lint.
.
You can also look into Apache::Lint which is a mod_perl wrapper around
HTML::Lint.
.
Finally, for those of you doing automated testing with Test::More and
its brethren, Test::HTML::Lint lets you automate HTML checking.