HTML::Lint is a set of Perl modules that finds syntactic and semantic errors in HTML code. Some of it comes from Neil Bowers' classic (and now abandoned) weblint.