Katana VentraIP

XHTML

Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages which mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated.[1]

Filename extension

.xhtml, .xht,
.xml, .html, .htm

application/xhtml+xml

public.xml

26 January 2000 (2000-01-26)

While HTML, prior to HTML5, was defined as an application of Standard Generalized Markup Language (SGML), a flexible markup language framework, XHTML is an application of XML, a more restrictive subset of SGML. XHTML documents are well-formed and may therefore be parsed using standard XML parsers, unlike HTML, which requires a lenient HTML-specific parser.[2]


XHTML 1.0 became a World Wide Web Consortium (W3C) recommendation on 26 January 2000. XHTML 1.1 became a W3C recommendation on 31 May 2001. XHTML is now referred to as "the XML syntax for HTML"[3][4] and being developed as an XML adaptation of the HTML living standard.[5][6]

Broadly, the XML rules require that all be closed, either by a separate closing tag or using the self-closing syntax (e.g. <br />), while HTML syntax permits some elements to be unclosed because either they are always empty (e.g. <input>) or their end can be determined implicitly ("omissibility", e.g. <p>).

elements

XML is case-sensitive for element and names, while HTML is not.

attribute

Some shorthand features in HTML are omitted in XML, such as (1) attribute minimization, where attribute values or their quotes may be omitted (e.g. <option selected> or <option selected=selected>, while in XML this must be expressed as <option selected="selected">); (2) element minimization may be used to remove elements entirely (such as <tbody> inferred in a table if not given); and (3) the rarely used SGML syntax for element minimization ("shorttag"), which most browsers do not implement.

[25]

There are numerous other technical requirements surrounding namespaces and precise parsing of whitespace and certain characters and elements. The exact parsing of HTML in practice has been undefined until recently; see the HTML5 specification () for full details, or the working summary (HTML vs. XHTML).

[HTML5]

XHTML 1.0 Strict is the XML equivalent to strict HTML 4.01, and includes elements and attributes that have not been marked deprecated in the HTML 4.01 specification. As of November 2015, XHTML 1.0 Strict is the document type used for the homepage of the website of the .

World Wide Web Consortium

XHTML 1.0 Transitional is the XML equivalent of HTML 4.01 Transitional, and includes the presentational elements (such as center, font and strike) excluded from the strict version.

XHTML 1.0 Frameset is the XML equivalent of HTML 4.01 Frameset, and allows for the definition of —a common Web feature in the late 1990s.

frameset documents

Semantic content in XHTML[edit]

XHTML+RDFa is an extended version of the XHTML markup language for supporting RDF through a collection of attributes and processing rules in the form of well-formed XML documents. This host language is one of the techniques used to develop Semantic Web content by embedding rich semantic markup.

Cross-compatibility of XHTML and HTML[edit]

HTML5 and XHTML5 serializations are largely inter-compatible if adhering to the stricter XHTML5 syntax, but there are some cases in which XHTML will not work as valid HTML5 (e.g., processing instructions are deprecated in HTML, are treated as comments, and close on the first ">", whereas they are fully allowed in XML, are treated as their own type, and close on ?>).[71]

Extensible User Interface Protocol

HTML

List of XML and HTML character entity references

from WHATWG

The XML syntax for HTML

XHTML 1.0 Recommendation

Beware of XHTML

Empty elements in SGML, HTML, XML, and XHTML

Heptagrama's Basic XHTML 1.0 Strict Tutorial

W3C's Markup Validator

HTML to XHTML conversion library for .NET