Jaydman asked:
Quick side question: What is the purpose of xhtml does it have any advantages besides making you code look better?
Huge advantage: you can validate that the code is correct using any XML parser.
Actually, you should not even play with the idea of writing some HTML code which is not well-formed XML, even if your document type is HTML and not XHTML. Working in a quick but sloppy way does not pay off. The looseness of original HTML (as compared with XML) was a considerable design mistake, in my opinion. In real life, writing such loose HTML makes no practical sense; you would not gain anything except potential troubles.
One of the possible techniques I would recommend: create all files as XHTML, validate them as you type, and, at the very end, you can rename them to HTML.
—SA