XHTML
Introduction
Extensible Hypertext Markup Language (XHTML) is a family of XML-based markup languages that mirror or extend versions of the widely used Hypertext Markup Language (HTML), the language in which web pages are written. While HTML (prior to HTML5) was defined as an application of Standard Generalized Markup Language, a flexible markup language framework, XHTML is an application of XML, a more restrictive subset of SGML.
History
XHTML 1.0, published on January 26, 2000, as a W3C Recommendation, was a reformulation of three HTML 4 Document Type Definitions in XML. It was the first markup language from the HTML family that was defined as an XML application.
Syntax and Document Structure
XHTML documents must be well-formed XML documents, meaning they need to adhere to basic syntax rules of XML. For example, all elements must be properly nested, tags are case-sensitive, and all elements must be closed.
XHTML 1.0
XHTML 1.0 became a World Wide Web Consortium (W3C) Recommendation on January 26, 2000. XHTML 1.0 is "HTML4 as an XML 1.0 application", and its three DTDs correspond directly to the ones defined by HTML4. The semantics of the elements and their attributes are defined in the W3C Recommendation for HTML 4. These semantics provide the foundation for future extensibility of XHTML.
XHTML 1.1
XHTML 1.1 became a W3C Recommendation on May 31, 2001. It is a separate version of XHTML. XHTML 1.1 includes everything in XHTML 1.0 Strict with a few exceptions.
XHTML 2.0
XHTML 2.0 was a markup language proposed by the World Wide Web Consortium (W3C) that would have represented the next major version of XHTML. However, the specification was abandoned in 2009 in favor of work on HTML5 and XHTML5.
XHTML 5
XHTML5 is the XML serialization of HTML5. Like HTML5, it is a standard for writing web pages but with strict syntax rules. As an XML application, it allows authors to use standard XML tools to develop web pages.
XHTML vs HTML
While XHTML may look like HTML, it is a fundamentally different language. XHTML must be well-formed, while HTML does not. XHTML elements must be properly nested, have end tags, and must not contain attribute minimization.
XHTML Today
Today, XHTML is not as widely used as HTML. However, it is still a powerful tool for creating web pages and web applications, especially in environments where the document must be parsed using XML tools.