Difference between HTML to XHTML
Difference between HTML and XHTML often subtle but marked difference anyway was brilliantly summarised by UK WW member resonate. A brief highlight of some of the differenced follows:
- Tags must be properly nested: overlapping elements are not allowed
- Tags and attributes must be in lower case
- All elements must be closed
- Attribute values must always be quoted
- Attributes cannot be minimized: For example, <option selected> is incorrect it should be instead: <option selected=”true”>
- ID attribute replaces the Name attribute
- Mandatory elements: XHTML documents require certain mandatory elements. The html, head, body and title elements must exist. Additionally there must be a DOCTYPE declaration.
The Most Important Differences:
- XHTML elements must be properly nested
- XHTML elements must always be closed
- XHTML elements must be in lowercase
- XHTML documents must have one root element
You can read the full article here

