HTML vs XHTML
XHTML requires several improvements when compared to HTML. Those changes can be divided into three parts:
Changes in Document Structure
are compulsory.
- All documents require DOCTYPE.
- The xmlns attribute in <html> is mandatory, and will define the document's xml namespace.
- The corresponding closing tags of <html>, <head>, <title>, and
Changes in XHTML Tags
- All tags for XHTML will be in the lower case.
- All tags in XHTML have to be closed.
- All XHTML tags must be nested correctly.
- There must be one root dimension of the XHTML documents.
Changes in XHTML Tags
- All XHTML attributes need to be properly added.
- In the lower case all XHTML attributes have to be.
- The name feature has modified.
- XHTML properties cannot be shortened.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>title here</title>
</head>
<body>
Add here some content
</body>
</html>