Hyper Text Markup Language or HTML is the means for describing the structure of text information in all web documents. XHTML or Extensible Hyper Text Markup Language is almost similar to HTML in most of its features which is designed for being a HTML successor.
There are very few minor points if we compare them as they are like identical twins. XHTML was actually derived from HTML. The major difference between them is coding in XHTML is comparatively strict than HTML that is if there are some lapses in structure and coding while working in HTML than it could get away easily but that is not a case while working in XHTML. In HTML, there is a liberty to ignore validation of the code. Moreover, tag closing is compulsory in XHTML which is not compulsory in HTML so XHTML closes the tags which were left open by HTML. So we can say that XHTML actually completes HTML.
Also in XHTML, closing of nested tags should be performed in same manner and form in which manner its opening was done. It is also done in HTML but it is not as strict as XHTML. Moreover, tags should be compulsorily used in lowercases in XHTML which is not the case in HTML.
Another difference between them is HTML is an application of SGML (Standard Generalized Markup Language) while XHTML is an application of XML (Extensible Markup Language). HTML also allows user to omit certain tags and use attribute minimization but XHTML doesn’t permit the omission of tags or the use of attribute minimization but it does provide some short notations for some empty elements like for
we can use