Use the API from W3C for teir HTML validator to check the validation of a page/set of pages (maybe recursively). Could be in Java, C, C++, Haskell or even in bash script.