XHTML
XHTML is an XML version of HTML
HTML is already a lot like XML, with some minor textual but
important differences:
-
XHTML elements must be properly nested
-
XHTML elements must always be closed
E.g. This is incorrect XHTML:
A break: <br>
A horizontal rule: <hr>
An image: <img src="happy.gif" alt="Happy face">
While this is correct XHTML:
A break: <br />
A horizontal rule: <hr />
An image: <img src="happy.gif" alt="Happy face" />
-
XHTML elements must be in lowercase
-
XHTML documents must have one root element
See also the W3C
HTML and XHTML FAQ.