I create my HTML using Open Office Writer; open my source document, then open a new html document and copy and paste my selection into it. I save that, the run it through tidy to create an xhtml document (with appropriate options to collect up all the styles in one place). Then i move the useful styles into my css and delete the rest. A little tool called quoter fixes the straight quotes (mostly). After I prepare the content and ncx files I zip it up and send it off to the epub validator tool at threepress.org. (You can download a java version - I don't recall where...) Or you can search mobileread for 'Azardi' and find a Windows reader/checker/editor - which is what you really want for final checking. I'm working on adapting it for Linux and Mac, soon I hope.
So, in short form - you want the threepress.org epub validator or Azardi for checking, and some of the other bits to have less error to fix