Strictly speaking, it isn't possible to validate HTML-based documents because HTML isn't actually an XML language and therefore doesn't conform to the rules of XML. However, you can code web pages in XHTML, which is a markup language that can be validated. XHTML is an XML-based language that is very similar to HTML but with the improved structure of XML. You learn all about XHTML in Hour 21, "Adding Structure to the Web with XHTML," including how to validate XHTML web pages.
Q.
Do I have to check a document for well formedness before moving on to checking it for validity?
A.
No. I recommend the two-stage check on a document only because it helps to clarify the different types of errors commonly found in XML documents. Your goal should be to develop enough XML coding skills to avoid most well-formedness errors, which frees you up to spend most of your time tackling the peskier validity errors. Knowing this, at some point you may decide to jump straight into the validity check for documents as you gain experience.