XHTML is more formal and stricter version of HTML. i.e.
- It has properly nested elements.
- All XHTML elements must always be closed.
- All XHTML elements must be written in lower case.
- Every XHTML document must have one root element.
That is the reason behind its preferences over HTML because; most of the web pages contain bad HTML.