Introduction· XHTML 1.1· Semantics· Benefits· So what?·
QA Homepage· Latest News· QA Resources· QA IG· QA WG· QA Calendar·
The history of HTML at W3C starts with HTML 3.2, code named Wilbur
, which was followed a few years later by HTML 4.0, then HTML 4.01 which is the last version of HTML. HTML 4.01 is the last W3C specification which defines the semantics of the elements of the main hypertext mark-up language on the Web. From HTML 3.2 to HTML 4.01, the language has improved a lot and has started to remove features which caused internationalization and accessibility problems. XHTML 1.0 was created shortly after HTML 4.01 to help the transition of hypertext to a new generation of mark-up languages for text.
In this document, we will not address XHTML 1.1 which is an additional step toward a more flexible version of hypertext with the full benefits of XML architecture and integration of different technologies. Note that XHTML 1.1 has slighly improved the semantics of HTML 4.01 by including a ruby module, used in particular languages like Japanese scripts (read the ruby specification for more information).
HTML 4.01 and XHTML 1.0 assign the same semantics to their elements and attributes. For example, an element address
has exactly the same meaning in HTML 4.01 and XHTML 1.0. Only bits of the syntax varies between the two languages. For example :
<img alt="Portrait Murakami Haruki" src="/images/murakami.jpg"> <p lang="fr">Je levai la tête pour regarder les étoiles. Leur vue apaisa peu à peu les battements de mon coeur.</p> <p><cite class="title">Chroniques de l'oiseau à ressort</cite> - <cite class="author">Haruki Murakami</cite></p>
<img alt="Portrait Murakami Haruki" src="/images/murakami.jpg"/> <p xml:lang="fr">Je levai la tête pour regarder les étoiles. Leur vue apaisa peu à peu les battements de mon coeur.</p> <p><cite class="title">Chroniques de l'oiseau à ressort</cite> - <cite class="author">Haruki Murakami</cite></p>
Their syntaxes are still very similar and there are only a few differences between them.
Both languages come in three flavours: frameset, transitional and strict. The "strict" flavour is strongly recommended for both of them; indeed, the strict flavour make sure that artefacts and problems that were identified in HTML 3.2 are not allowed, while the transitional flavour allows some of those to helps implementers to upgrade smoothly their software or their content.
Is there any advantage to use one version of HTML more than the other? There is no simple answer and the benefits you will gain are tied to the context and the use of the language.
Switching from HTML 4.01 to XHTML 1.0 brings almost no direct benefits for the visitors of your Web site; still, there are several good reasons on the authoring side that may incite you to make the switch:
A few recipes on using XSLT and XHTML together are given on the W3C Web site.
The syntax rules defined by XML are more consistent and hence easier to explain than the SGML rules on which HTML is based. It also helps teach the CSS Box Model.
HTML 4.01 is as valuable as XHTML 1.0 in a daily usage; the syntax proposed by XHTML 1.0 has several important benefits, but the weight of these benefits has to be evaluated in the context of your project: use the right tool for the right job.
For a Web designer, starting to use XHTML 1.0 might be helpful in some circumstances and will certainly help to smoothly negociate the future. XHTML 1.0 gives a wonderful opportunity to learn about XML languages and their possibilities without having to learn new semantics. It seems to be a reasonnable way of improving one's competences without too much work.