adrianh is completely correct; tidy (HTML) is an excellent tool for partial cleanup of bad (ie, non-w3c compliant) html and for pretty-fying code to make it easier to read when another author (or one of the less sensible WYSIWYG) has obfuscated the code... but it is NOT a validator.