XHTML and HTML
XHTML and HTML
1. XHTML :
XHTML stands for Extensible Hypertext Markup Language. It can be
considered as a part of the XML markup language this is because of
XHTML have features of both XML and HTML. XHTML is extended from
XML and HTML. XHTML can be considered as a better version of HTML.
2. HTML :
HTML is the Hypertext Markup Language which is the most widely used
language over the internet. HTML is used to create web pages and link them
from one to another. Please note HTML is not a programming language, it is a
markup language. We can use different other technologies as like CSS
and javascript to give a new look to the pages developed by HTML.
Difference between HTML and XHTML :
S.No. HTML XHTML
1. HTML stands for Hypertext Markup XHTML stands for Extensible Hypertext
Language. Markup Language.
2. It was developed by Tim Berners-Lee. It was developed by W3C i.e World Wide
Web Consortium.
3. It was developed in 1991. It was released in 2000.
4. It is extended from SGML. It is extended from XML and HTML.
5. The format is a document file format. The format is a markup language.
6. All tags and attributes are not In this, every tag and attribute should be in
necessarily to be in lower or upper lower case.
case.
7. Doctype is not necessary to write at Doctype is very necessary to write at the
the top. top of the file.
8. It is not necessary to close the tags in It is necessary to close the tags in the order
the order they are opened. they are opened.
9. While using the attributes it is not While using the attributes it is mandatory to
necessary to mention quotes. For e.g. mention quotes. For e.g. <Geeks=”GFG”>.
<Geeks>.
10. Filename extension used Filename extension are .xhtml, .xht, .xml.
are .html, .htm.
How to migrate from XHTML to HTML
To understand the subtle differences between HTML and XHTML, consider
the transformation of a valid and well-formed XHTML 1.0 document into a valid
HTML 4.01 document. To make this translation requires the following steps: