XHTML
documents must be well-formed
All XHTML
elements must be nested within the <html> root element. All other
elements can have sub (children) elements. Sub elements must be in pairs and
correctly nested within their parent element. The basic document structure is:
<html>
<head> ... </head>
<body> ... </body>
</html>
All XHTML
elements must be closed
Non-empty
elements must have an end tag. Example: <p>This
is a paragraph</p>
Empty
elements must either have an end tag or the start tag must end with />.
Example:
This is a
break<br />
Here comes a horizontal rule:<hr />
Here's an
image <img src="happy.gif" alt="Happy face" />
*
IMPORTANT Compatibility Note: To make your XHTML compatible with today's
browsers, you should add an extra space before the "/" symbol like
this: <br />, and this: <hr />.
Tag names
must be in lowercase
This is
because XHTML documents are XML applications. XML is case-sensitive. Tags like
<br> and <BR> are interpreted as
different tags.