XHTML

XHTML, which stands for Extensible Hypertext Markup Language, is a markup language that extends versions of the widely used Hypertext Markup Language ([[HTML]]). XHTML is part of the family of XML markup languages and is essentially a stricter and cleaner version of HTML, adhering more closely to [[Extensible Markup Language|XML]] standards.

XHTML documents must be well-formed XML documents. This means they must adhere to stricter syntax rules compared to HTML, such as properly nested and closed tags, and case sensitivity for tags and attributes.

XHTML was designed to be almost fully backward compatible with HTML. It uses the same elements (like <p>, <div>, <a>, etc.) as HTML but applies the stricter syntax rules of XML. XHTML 1.0, the first major version, came in three DTDs ([[DTD (Document Type Definition)|Document Type Definitions]]): Strict, Transitional, and Frameset. Strict is the most stringent in terms of adhering to XML standards.

The development of XHTML aimed to create a markup language that could be used with a wider range of devices (not just web browsers) and improve web standards compliance. XHTML should be served with an XML [[MIME-Type|MIME]] type, such as application/xhtml+xml. When served with this MIME type, it is expected that browsers will parse it strictly as XML.

Being an XML application, XHTML documents can be parsed and processed by standard XML tools, which allows for greater flexibility and interoperability in web development. XHTML's popularity has declined with the advent of HTML5, which offers new features and more flexible syntax rules. HTML5 aims to incorporate the benefits of XHTML while maintaining compatibility with legacy HTML.

XHTML is still used in web development, particularly in environments where strict compliance with XML is required or beneficial. Like HTML, XHTML supports accessibility standards and internationalization, making web content more accessible to people with disabilities and in different languages.

XHTML5 is a variant of HTML5 that follows XML syntax rules. It combines the new features of HTML5 with the strict syntax of XML.