What’s XHTML?

Print anything with Printful



XHTML is a language recommendation based on XML, created to solve limitations and implementation issues with HTML. It offers extensibility through the use of other XML namespaces and can be used for more than just page formatting, such as displaying mathematical formulas and embedding images. It offers three document type definitions and later versions include XML schemas.

Extensible hypertext markup language (XHTML) is a quick way to refer to several language recommendations that are widely used on Internet-enabled devices for viewing web pages. Though named after its predecessor, Hypertext Markup Language (HTML ), is actually based on extensible markup language (XML), which is a very selective part of the standard generalized markup language (SGML). In essence, they are all children of SGML. While HTML is a direct application of SGML, XHTML is what is called a namespace, or a set of definitions for an XML document that helps eliminate ambiguity when more than one XML vocabulary is used in a given situation.

The language came about due to some limitations to HTML and the varied way of implementing HTML. By the time HTML reached version four, it had begun to decline in proper use by many HTML user agents, the computer programs that parse HTML documents into a formatted, viewable Web page. As mobile devices and other web viewing platforms were also emerging, a better solution was needed. XML is a much stricter implementation of SGML on HTML and several XML namespaces can be used in a single instance. Thus, around the year 2000, the World Wide Web Consortium (W3C) drafted and made XHTML one of its recommendations for solving some of these emerging problems.

For all intents and purposes, XHTML mimics HTML in most ways, but since the former uses an XML namespace, it can be parsed by any XML interpreter, whereas HTML is restricted to HTML interpreters only. XHTML is actually HTML recreated under the more restrictive XML subset of SGML. In this way the most recent language was immediately able to be interpreted by existing web browsers, making it available for other platforms as well. It’s also important to note the extensible aspect of the XHTML moniker. Not only does it offer the ability to be read by multiple programs and platforms, it is also further extensible by allowing other XML namespaces to be used within its documents.

With XHTML’s ability to include other XML namespaces in a document, it can be extended in a number of ways to present more than just page formatting. For example, the mathematical markup language (MathML) can be included in these documents to display mathematical formulas and notation. Images can also be embedded using the scalable vector graphics (SVG) namespace within a document of this type. As such, XHTML can also be included in another XML document.

Since XHTML is really just HTML refined according to the rules of XML, it offers three document type definitions (DTDs) that duplicate those of HTML version four. A DTD is a detailed description of the elements of a markup language, including when, where and how it can be used, as well as any associated attributes. In later versions of XHTML however, XML schemas were established, another more robust way of describing an XML document, which further augmented XHTML. In turn, various stripped down versions of XHTML have been developed which can then be developed for specific uses, many of which revolve around mobile computing platforms.




Protect your devices with Threat Protection by NordVPN


Skip to content