HTML Tidy, also known as just Tidy, is a program developed by Dave Raggett and currently maintained and enhanced by a group of programmers as a SourceForge project. More information can be obtained at http://tidy.sourceforge.net/
Tidy is designed to clean up errors in HTML documents. Tidy is able to fix up a wide range of problems and to highlight a lot more that it can't fix. It will bring to your attention things that you need to work on them yourself. Each item found is listed with the line number and column so that you can see where the problem lies in your markup. Tidy won't generate a cleaned up version when there are problems that it can't be sure of how to handle.
 To run Tidy
This is a command line application so you will need a CMD.COM (Command prompt or DOS) window. Make sure that the tidy.exe is in a folder contained in the search path. The program is run using the command
C:\>tidy [-switches] file.htm
Or you can use a GUI for this program: GUITIDY or TidyGUI
 For more information
Besides the main source forge development site there are a few other references.