Always use lowercase letters and put quotes around attributes: all element and attribute names must be in lowercase, and all attribute values must be in double quotes. Correct: Correct :
Incorrect:
Correct:
Close all elements: In HTML some elements do not need to be 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:
Correct:
Error :
Lorem IPSUM DOLOR SIT AMET, Consectetuer Adipiscip Elit.确>
Error:
Correct:
Attributes cannot be shortened: In HTML, some attributes can be shortened. XHTML doesn't allow this.
Incorrect:
Correct:
Do not use excluded elements: Some elements and attributes are allowed in HTML 4.01 Transitional and XHTML 1.0 Transitional, and It is not supported under XHTML 1.0 Strict (and in HTML 4.01 Strict). Such as ,
, alink, align, width, height (for some elements) and background.
Span elements are not allowed if they are missing one of the following opening tags: "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre ", "address", "fieldset", "ins", "del"
Form (form elements must exist within the container):
Error