03
Feb
The main difference between XHTML and HTML is that XHTML is very very strict!
No carelessness will be tolerated here.
All tags must be closed! Empty as well as non empty elements must be closed. For example:
<p>This is a paragraph</p>
<br /> break (Note: please don’t forget the space before the ‘/’ as it will create compatibility issues in certain cases!)
XHTML is a combination of HTML and the strict syntax of XML.
Main points to remember regarding XHTML are:
- All elements must be properly closed and nested
- All elements must be in lowercase
- All documents must have a root element
- DOCTYPE declaration, <head> and <body> sections must be specified.
Have a xhtml page ready and wondering if you have got everything right? Simply use the following validator…Easy!




