Important rules regarding elements in XHTML 1.0:

Document must have one root element.
<html>
<body>
<p>Only one "<html>" element allowed</p>
</body>
</html>

Elements must be properly nested.
BAD
<p>This is not <b><i>good</b></i></p>
GOOD
<p>This is <b><i>good</i></b></p>

Elements must be in lower case.
BAD
<P>No <STRONG>upper case</STRONG> tags allowed</P>
GOOD
<p><strong>Lower case</strong> only<p>

Elements must be properly closed.
BAD
<table>
<tr>
<td>This is not a good table</tr>
</table>

GOOD
<table>
<tr>
<td>This is a good table</td>
</tr>
</table>

Empty elements must be closed properly.
BAD
<hr>
<br>

GOOD
<hr />
<br />

 

›› go to examples ››