XHTML 1.0 Strict vs XHTML 1.1

From SwinBrain

Contents

Some Confusion

There are common misunderstandings on many public forums about the difference between XHTML 1.0 (say, Strict) and the "newer" XHTML 1.1. Some people confuse this topic with the difference between HTML and XHTML - that's another story. Some web development clients have even demanded that a site be XHTML 1.1 simply because they think that must be better than version 1.0, which must have been "defective" and so needed a newer 1.1 verion - this is simply not true.

XHTML 1.0 and XHTML 1.1 were developed and recommended, by the W3C, with two different outcome objectives. XHTML 1.0 is not a defective or incomplete version of XHTML, but has a specific purpose which is different to the intended purpose of XHTML 1.1.

The Short Version

  • XHTML 1.0 is the reformulation of HTML 4.01 using the syntax rules of XML.
  • XHTML 1.1 is the modularisation of XHTML 1.0 and the removal of deprecated physical elements and attributes. Only structural elements remain.

Simple Facts

In the development of XHTML 1.0, the nice rules of XML syntax were applied to the existing tag names and attributes of HTML. However, physical tags like <font>, <b> and <i> and physical attributes like align, bgcolor etc - although deprecated in XHTML 1.0 - still remained. This was (and is) important for compatibility, and encouraged the use of the better (cleaner/consistent) XML syntax, while still allowing XHTML working with older HTML based web browsers.

However, XHTML 1.0 was only a partial application of the ideas of XML applied to HTML. To complete the picture, remove deprecated tags and attributes, only keep the structural markup and attributes, and allow for the inclusion of specialised modules when needed rather than including them in an entire doctype standard.

Official W3C Specs

The W3C site has all the spec's!

From http://www.w3.org/TR/xhtml11/changes.html#a_changes we have a clear list of the strategy.

Most significant is the removal of features that were deprecated. In general, the strategy is to define a markup language that is rich in structural functionality, but that relies upon style sheets for presentation.

The differences can be summarized as follows:

  1. On every element, the lang attribute has been removed in favor of the xml:lang attribute....
  2. On the a and map elements, the name attribute has been removed in favor of the id attribute ...
  3. The "ruby" collection of elements has been added ...

Elements

XHTML 1.0 Strict (list of elements)XHTML 1.1 (modules of elements)
  • a, abbr, acronym, address, area,
  • b, base, bdo, big, blockquote, body, br, button,
  • caption, cite, code, col, colgroup,
  • dd, del, dfn, div, dl, dt,
  • em,
  • fieldset, form,
  • h1...h6, head, hr, html,
  • i, img, input, ins,
  • kbd,
  • label, legend, li, link,
  • map, menu, meta,
  • noframes, noscript,
  • object, ol, optgroup, option,
  • p, param, pre,
  • q,
  • samp, script, select, small, spacer, span, strong, style, sub, sup,
  • table, tbody, td, textarea, tfoot, th, thead, title, tr, tt,
  • ul,
  • var
  • Structure: body, head, html, title
  • Text: abbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var
  • Hypertext: a
  • List: dl, dt, dd, ol, ul, li
  • Object: object, param
  • Presentation: b, big, hr, i, small, sub, sup, tt
  • Edit: del, ins
  • Bidirectional Text: bdo
  • Forms: button, fieldset, form, input, label, legend, select, optgroup, option, textarea
  • Table: caption, col, colgroup, table, tbody, td, tfoot, th, thead, tr
  • Image: img
  • Client-side Image Map: area, map
  • Server-side Image Map: Attribute ismap on img
  • Intrinsic Events: Events attributes
  • Metainformation: meta
  • Scripting: noscript, script
  • Stylesheet: style element
  • Style Attribute(Deprecated): style attribute
  • Link: link
  • Base: base