XHTML 2.0 Drafted (1/2) - exploring XML | WebReference

XHTML 2.0 Drafted (1/2) - exploring XML

XHTML 2.0 Drafted

On the fifth of August the W3C released the first public draft of XHTML 2.0. A first peek reveals a couple of changes as well as one major new feature. Let's look at them in turn:

Changes in 2.0 from 1.1

XHTML 1.1 was a minor update to the initial formulation of HTML in XML. A strict and a more lenient DTD were defined to balance between the goal of dividing content from presentation, and the desire for being as backward-compatible as possible to HTML 4. A third DTD for framesets was also defined.

With the second version of XHTML, further changes away from HTML and towards XML are proposed:

Nested sections and headings

Although the infamous h1 to h6 elements for headings have not been deprecated, new elements are proposed for declaring text sections and headings, section and h respectively. This enables an author to start a new section without forcing the heading to be the first element of this section. Furthermore, the nesting level will define the heading structure, not the explicit use of the h1 to h6. Paragraphs like the following:

<h2>Company<h2>
  <p>Our company is the greatest in the world.</p>
  <p>We also have the best products:</p>
  <h3>Products<h3>
    <p>For instance our supersonic screwdriver...</p>

Could be restructured into:

<section>
  <h>Company<h>
  <p>Our company is the greatest in the world.</p>
  <section>
    <p>We also have the best products:</p>
    <h>Products<h>
      <p>For instance our supersonic screwdriver...</p>

Lines instead of line breaks

The line break tag br has been deprecated in favor of a line element that should enclose a part of a paragraph to be rendered on its own line, followed by a line break:

<p>Our company is the greatest in the world.<br />
We also have the best products:<br />
For instance our supersonic screwdriver...</p>

Would turn into:

<p>Our company is the greatest in the world.
<line>We also have the best products:</line>
For instance our supersonic screwdriver...</p>

More changes...


Produced by Michael Claßen

URL: http://www.webreference.com/xml/column62/index.html
Created: Aug 21, 2002
Revised: Aug 21, 2002