How the Web Works: XHTML

Differences Between HTML & XHTML

HTML 4.01 XHTML 1.0
Forgiving Requires discipline and attention to detail
Correct nesting required in theory Correct nesting absolutely required
Some end tags optional All end tags required
No end tag for empty content model Even empty content model requires end tag
Case insensitive Lowercase only
Some attribute values needn't be quoted All attribute values must be quoted
Certain "valueless" attribute values are OK All attributes must have values
Less sensitive to special characters More sensitive to special characters
Ubiquitous name attribute Id attribute preferred to name, mostly