XHTML | |
---|---|
Filename extension | .xhtml, .html +, .htm +, .xht, .xml + |
Internet media type | application/xhtml+xml |
Developed by | World Wide Web Consortium + |
Type | Markup language |
Standard | XHTML 1.0 XHTML 1.1 XHTML 2.0 (Working Draft) |
File formats category - |
The Extensible Hypertext Markup Language (XHTML) is a markup language developed by the W3C as an extension of HTML (HTML 4) that conforms to XML syntax.
Document types[]
In XHTML 1.0, there are three DTDs which represent corresponding DTDs in HTML 4. These are:
- XHTML-1.0-Strict - This excludes elements that were deprecated in HTML 4.
- XHTML-1.0-Transitional - This matches HTML 4 Transitional and includes deprecated elements for backward compatibility.
- XHTML-1.0-Frameset - Includes deprecated elements as well as support for framesets.
Versions[]
- XHTML 1.0 is the first version. The second edition became a recommendation in August 2002.
- XHTML 1.1 follows from XHTML 1.0 Strict, with a few changes: the addition of elements for ruby annotation, and the deprecation of the
lang
andname
attributes. - XHTML 2.0
- HTML 5
Specification[]
XHTML 2.0[]
XHTML 2.0 added some elements to the XHTML 1.x specification. These include:
<section>
and<h>
In previous versions, document structure can only be inferred by the location of sections of text (that is, by using <h1>
, <h2>
, …). The <section>
and <h>
elements allows to specify the structure explicitly.
<h>Markup</h>
<section>
<h>Introduction</h>
<p>....</p>
<section>
<h>Structure</h>
<p>....</p>
</section>
</section>
<hr>
is renamed to<separator>
.<br />
is replaced by the<l>
element, which does not represent line breaks themselves but individual lines.<nl>
(navigation list) has been added.- The
src
attribute may be applied to any element, this replaces functionality given by the<img>
element. It also allows for fallback functionality given by<object>
. - The
href
attribute may be applied to any element and thus may become a hyperlink. - The
edit
attribute may be applied to any element and replaces functionality given by<ins>
and<del>
. - The events structure has been replaced by XML Events.
- HTML Forms has been replaced by XForms.
- Frame functionality is redefined through XFrames.