Google News
logo
UI Developer - Interview Questions
What are the key differences between XHTML and HTML?
HTML XHTML
HTML is an acronym that stands for Hypertext Markup Language. It is the most widely used language over the internet. XHTML is an acronym that stands for Extensible Hypertext Markup Language.
HTML is a language used to create web pages and link them from one to another. XHTML is considered a part of the XML markup language. It contains the features of both XML and HTML.
Tim Berners-Lee developed HTML in 1991. XHTML was developed by W3C, i.e., World Wide Web Consortium, and was released in 2000.
HTML is extended from SGML and follows the format of document file format. XHTML is extended from XML and HTML and follows the markup language format.
In HTML, it is not necessary to write Doctype at the top. In XHTML, you must write Doctype at the top of the file.
HTML is not strictly case-sensitive. It is not necessary to put all tags in lower or upper case. XHTML is strictly case-sensitive. Here, you have to put every tag and attribute in lower case.
In HTML, it is not necessary to close the tags in the order they are opened. In XHTML, you must close the tags in the order they are opened.
HTML is an older language for linking web pages on the internet. In comparison, XHTML is called a better version of HTML.
In HTML, it is not necessary to mention quotes while using attributes. For example: <JavaTpoint>. In XHTML, it is mandatory to mention quotes while using attributes. For example: <JavaTpoint="JTP">.
In HTML, filename extensions are used as ".html", and ".htm". In XHTML, filename extensions are used as ".xhtml", ".xht", ".xml".
Advertisement