They are taken from the standards found at: http://www.w3.org/TR/xhtml1.
All opening tags that contain content must have a closing tag.
Example:
<p>This is the first paragraph. (incorrect)
The correct form is
<p>This is the second paragraph.</p> (correct)
Empty Elements must have either an end tag or terminate with a blank followed by />
<hr> (incorrect)
<hr /> (correct)
Tags must be properly nested
<b><sup>This is bolded superscript</b></sup> incorrect
<b><sup>This is bolded superscript</sup></b> correct
Element and attribute names must be in lowercase letters
<IMG SRC="myimage.gif"> (incorrect)
<img src="myimage.gif"> (correct)
The values of attributes must be in quotation marks
<table border=1> (incorrect)
<table border="1"> (correct)
Attribute values cannot be minimized
<table border> (incorrect)
<table border="1"> (correct)
The id attribute is used to identify objects
<img name "image1" id="image2" src="myimage.gif">
The XHTML processor will use image2, rather than image1, as the identifier of the object.
XHTML enforces additional rules concerning whitespace
The following characters are defined as whitespace characters in XHTML:
space
tab
carriage return
form feed
Zero-width space
The organization of any text enclosed with <pre> tags is preserved. Otherwise, whitespace is handled according to the following rules:
-All whitespace that surrounds block elements should be removed.
-Comments are removed entirely and do not affect whitespace handling. One whitespace character on either side of a comment is treated as two whitespace characters.
-Leading and trailing whitespace inside a block element must be removed.
-Line feed characters withing a block element must be converted into a space.
-A sequence of whitespace characters must be reduced to a single space character. For example, if you have a sequence of several spaces, it will be reduced to a single space in the display.
More Guidelines (Differences between HTML and XHTML
