XHTML is a Langage of beaconing being used for the writing of pages of the World Wide Web. Conceived at the origin like the successor of HTML, XHTML is based on syntax defined by XML, more recent and simpler than the syntax defined by SGML on which puts back HTML.

The name XHTML

Like many languages based on XML, XHTML starts with the letter X, which represents the extensible word . Thus the first document describing XHTML officially is called XHTML™ 1.0 The Extensible Hypertext Markup Language (“XHTML 1.0 the extensible HyperText Mark-up Language”). It is however the Abréviation XHTML which is a mark of the World Wide Web Consortium (W3C) and which is only used in the specifications which followed version 1.0.

XHTML, evolution of HTML

XHTML 1.0 is a simple reformulation of HTML 4 pursuant to XML 1.0. It is thus only about one change of Syntaxe, no functionality not having been added or withdrawn. The conversion of a document into HTML 4.01 in conformity into XHTML 1.0 can be done automatically without loss of information.

Conversion of HTML into XHTML

This example illustrates the syntactic differences most current between a document written in HTML 4 and XHTML 1.0:

<! PUBLIC DOCTYPE HTML " - //W3C//DTD HTML 4.01//EN" >
< title> Exemple HTML 4< /title>
< ul>
< li> Des elements like HTML, HEAD and BODY is implicit, their beacons opening and closing are optionnelles.< /li>
< li> De many closing beacons are optional, in particular for P (paragraph) and LI (entered of list).
< li> Les names of elements and attributes can < EM Class=" important" > librement< /Em> to mix capital and minuscules.< /li>
< li> Certains attributes has a default value < input type=" checkbox" checked value=" … " > .< /li>
< li> Les quotation marks is not < EM class=important> toujours< /em> obligatory around the values of attribut.< /li>
< li> Les empty elements does not have closing syntax < img src=" i.png" alt=" i" > .< /li>
< /ul>

<! PUBLIC DOCTYPE HTML " - //W3C//DTD XHTML 1.0 Strict//EN" " http: /www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
< HTML xmlns=" http://www.w3.org/1999/xhtml " >
< head>
< title>
Exemple XHTML 1.0< /title>
< /head>
< body>

< ul>
< li>
Tous the elements must be explicitly balisés.< /li>
< li>
Les closing beacons is not optionnelles.< /li>
< li>
Les names of elements and attributes < EM class=" important" > doivent< /em> to be in minuscules.< /li>
< li>
Tous the attributes must have a value clarifies < input type=" checkbox" checked=" checked" value=" … " /> .< /li>
< li>
Les quotation marks is < EM class=" important" > toujours< /em> obligatory around the values of attribut.< /li>
< li>
Les empty elements must be closed < img src=" i.png" alt=" i" /> .< /li>
< /ul>
< /body>
< /html>

Modularization of XHTML

The following evolutions divide language XHTML into modules, each one gathering a type of functionalities. This division is conceived to make it possible to extend the format, or contrary drawing some from the subsets adapted to specific contexts. As follows:
  • XHTML1.1 enriches XHTML1.0 with the element ruby making it possible to add annotations to the texts written in the ideographic languages (Japanese, Hebrew, Chinese…)
  • XHTML BASIC is a simplified subset, intended for the adaptation of the contents to the light customers (mobile)

Developments in hand

XHTML 2.0 is under development. It will not be compatible in ascent and descent, in particular because of the introduction of XForms and XFrames.

Valid document XHTML

So that a document is valid XHTML, it must have a declaration of the type (DOCTYPE) and an encoding (often in ISO) in conformity with the specifications of W3C.

Prolog in XML

Prolog XML is necessary only under certain conditions of encoding (character set other than UTF-8 in particular), and when the document is treated as a document XML (standard of contents application/xhtml+xml). It is thus not necessary for the majority of documents XHTML 1.0, knowing that it in addition involves in the navigator Web Internet Explorer 6.0 Windows a problematic mode of interpretation of the Cascading Style Sheets and scripts JavaScript.

According to the character set retained, the document can thus start with the following instruction put in first line: <? xml version=" 1.0" encoding=" Iso-8859-1"? >

Some examples of Declaration of the Type of Document in XHTML:

XHTML 1.0 Strict

XHTML 1.0 Transitional

XHTML 1.1

Declaration XMLNS

The redundancy of the attributes xml: Lang and Lang are necessary only in the event of document XHTML 1.0 treaty as a document text/HTML, according to the recommendations (nonnormative) of compatibility XHTML/HTML. One will write then:

< HTML xmlns=" http://www.w3.org/1999/xhtml" xml: lang=" fr" lang=" fr" >

In a document XHTML 1.0 treaty as a document application/a xhtml+xml or in a document XHTML 1.1 and beyond, one will write obligatorily:

< HTML xmlns=" http://www.w3.org/1999/xhtml" xml: lang=" fr" >

See too

Related articles

External bonds

  • also recovers the topic of the XHTML

Documents of W3C (in English)

  • Extensible

    XHTML™ 1.0 The Hypertext Markup Language (Second Edition), recommendation of the W3C, January 26th 2000 (1 {{Re}} edition), 2002 (2 {{E}} edition);

  • XHTML™ 1.1 BASIC, recommendation (candidate) of the W3C, July 13rd 2007;
  • Modularization off XHTML™ 1.1, working paper of the W3C, July 5th 2006;
  • XHTML™ 1.1 - Module-based XHTML (Second Edition), working paper of the W3C, May 31st 2001 (1 {{Re}} edition) February 16th 2007 (2 {{E}} edition);
  • XHTML™ 2.0, working paper of the W3C, July 26th 2006.

Translations of the recommendations of the W3C

  • XHTML 1.0 : The extensible HyperText Mark-up Language;

  • elementary
  • XHTML;
  • XHTML™ 1.1 - modular XHTML.

Tools for validation

  • Validator of the W3C (english language version);

  • French-speaking Validome validator;
  • French-speaking Validateur Multipages.

Random links:Banská Štiavnica | Scombrini | LXVIIe front century J. - C. | VRO | Remi Sergio

© 2007-2008 speedlook.com; article text available under the terms of GFDL, from fr.wikipedia.org