XHTML: Rules
Document Structure
- XHTML DOCTYPE is mandatory
- The xmlns[1] attribute in <html> is mandatory
- <html>, <head>, <title>, and <body> are mandatory
XHTML Elements
- XHTML elements must be properly nested
- XHTML elements must always be closed
- XHTML elements must be in lowercase
- XHTML documents must have one root[2] element
XHTML Attributes
- Attribute names must be in lower case
- Attribute values must be quoted
- Attribute minimization is forbidden[3]
[1] I'm not really sure what this means, but I think it has something to do with specifying URLs as namespaces to help separate conflicting information...?
[2] I think the root element would be the <html> tag in the XHTML document.
[3] Could be that XHTML will not assume defaults, so values of the attributes must always be indicated.