A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

XHTML2 versus HTML5

From WHATWG Wiki
Revision as of 17:58, 23 January 2009 by Annevk (talk | contribs) (well, it's a start)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

http://www.w3.org/MarkUp/2009/ED-xhtml-modularization2-20090123/

This page is an attempt to find out where XHTML2 and HTML5 features overlap, why certain design decisions in HTML5 have been made different, and why HTML5 lacks certain features XHTML2 has.

It is not an attempt to demonstrate that 5 > 2. We know that.

It is also very simple at this point. I wish my time was infinite.


XHTML Document Module

The html element

XHTML2 has version="" and xsi:schemaLocation="". HTML5 has neither.

Rationale: HTML5 does away with versioning in HTML defining it equivalent to CSS in that regard. XXX add something nice about why we do not have xsi:schemaLocation=""

The head element

XHTML2 has profile="". HTML5 has not.

Rationale: it does not appear to be used in the wild.

Note: this is still being debated by the HTML WG.

XHTML Structural Module

The blockcode element

HTML5 does not have this element. In HTML5 you can use <pre><code> instead.

Rationale: the blockcode element is not backwards compatible.

The heading elements

HTML5 does not have the h element. In HTML5 the h1-h6 elements work together with the section element. In XHTML2 only the h element works with the section element.

Rationale: the h element is not backwards compatible. Also, it seems important to define interaction between the h1-h6 elements and the section element so authors can more easily reuse existing content and assistive technology can still make sense of invalid pages.

The separator element

HTML5 does not have the separator element. It does have the hr element which means and does the same thing.

Rationale: the separator element is not backwards compatible and we cannot do away with the hr element so adding an equivalent element would just make matters more complex.

XHTML Text Module

...