In our previous article we have learnt what XHTML is and why should we use XHTML. You can read that article by clicking on the above previous button. Now today we will figure out the main differences between HTML and XHTML.
S.NO. | HTML | XHTML |
---|---|---|
1. | Stands for Hypertext Markup Language. | Stands for EXtensible Hypertext Markup Language. |
2. | Developed by Tim Berners-Lee in early 1990s. | Developed by World Wide Web Consortium (W3C) in 2000 |
3. | File Extension names are: .html and .htm. | File Extension names are .xhtml, .xht, .xml. |
4. | Format type is document file format. | Format type is Markup Language. |
5. | We can write tags and attributes in upper or lowercase. | All tags and attributes must be only in lowercase. |
6. | It’s not necessary to write DOCTYPE at the top of the document. | It’s mandatory to write DOCTYPE at the top. |
7. | It’s not necessary to all the tags. | It’s mandatory to close all the tags. |
8. | HTML is not so strict. | XHTML is very strict. |
9. | Extended from SGML. | Extended from XML and HTML. |
10. | HTML versions are: HTML2, HTML3.2, HTML4 and HTML5. | Versions are: XHTML1, XHTML1.1, XHTML2, XHTML5. |
Related Articles