Always use lowercase letters, let quotes accompany attributes: All elements and attributes must be named with lowercase, and all attribute values must use double quotes.
Error: <a href= "index. HTML "class=internal>
Correct: <a href= "index. HTML "class=" Internal >
Close all elements: some elements in HTML are not necessarily closed. When the next element starts, the previous element is automatically closed. This is not allowed in XHTML. All elements must be closed, even if there is no content (such as ).
Error: <li>item 1
Correct: <li>item 1</li>
Error: <p>lorem ipsum dolor sit amet, consectetuer adipiscing.
Correct: <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
Error: <br>
Correct: <br/>
Error:
Correct:
Attributes cannot be reduced: in HTML, some attributes can be reduced. XHTML is not allowed to do so.
Error: <input type= "checkbox" id= "CheckBox1" name= "CheckBox1" checked>
Correct: <input type= "checkbox" id= "CheckBox1" name= "CheckBox1" checked= "checked"/>
Do not use excluded elements: some elements and attributes are allowed in HTML 4.01 Transitional and XHTML 1.0 Transitional, and are not supported under XHTML 1.0 Strict (and in HTML 4.01 Strict )。 such as <font>, <center>, ALink, align, width, height (for some elements) and background.