HTML vs XHTML
There are some changes in XHTML as compared to HTML. These changes can be categorized in three parts:
Changes in Document Structure
- All documents must have a DOCTYPE.
- The xmlns attribute in <html> is mandatory and must specify the xml namespace for the document.
- <html>, <head>, <title>, and <body> are mandatory with their respective closing tags.
Changes in XHTML Tags
- All XHTML tags must be in lower case.
- All XHTML tags must be closed.
- All XHTML tags must be properly nested.
- The XHTML documents must have one root element.
Changes in XHTML Tags
- All XHTML attributes must be added properly.
- All XHTML attributes must be in lower case.
- The name attribute has changed.
- XHTML attributes cannot be shortened.
- XHTML attribute values must be quoted.
0 Comments