HTML5, XHTML2

Learning from history how to drive the future of the Web

(Note: These slides were produced in May 2009 to accompany presentations at Web Standards Group events in several cities in Australia.)

Michael(tm) Smith

mike@w3.org

http://people.w3.org/mike

sideshowbarker on Slideshare, Twitter, etc.

W3C “Interaction” domain

From 1997 through the end of 2006, work on HTML within the W3C focused exclusively on the XHTML dialect.

A government in exile...

From June 2004 to March 2007, work on the (non-XHTML) HTML language took place outside of the W3C.

About HTML5 (and HTML forms)...

HTML5 in the words of the W3C HTML WG...

HTML design principles

http://w3.org/TR/html-design-principles/

HTML design principles

Draconically”= “Draconian”= catch fire and fail

About XHTML2 (and XForms)...

XHTML2 in the words of the W3C XHTML WG...

XHTML2 Design Aims

http://w3.org/TR/xhtml2/introduction.html#aims

XHTML2 Design Aims

What does “declarative” mean?

Declarative programming success story : SVG

(XSLT also? XForms?)

HTML5 and XHTML2 in contrast...

Things HTML5 doesn’t do:

Things XHTML2 doesn’t do:

Important point: XHTML2 is a different language than XHTML1

...“different language” in that XHTML2 does not fully support existing XHTML1 content (not backward compatible)

A representative statement about the difference in philosophy:

“HTML is the assembly language of the Web.”

Important point: in some cases HTML5 offers a choice of both declarative and scripting approaches.

About error handling...

Which of the following are errors?

The following is a real error.

<i> <b> misnested tags </i> </b>

HTML5 parsers can handle real errors interoperably and gracefully.

Why is it important to handle errors?

More than 93% of Alexa Top 500 sitescontain HTML conformance errors.

A little history...

(About draconian error handling in XML) I think users and application builders should have a choice with what they do with invalid data ... I therefore plan to continue to provide it even if the spec says that this is non-conforming.

April 1997

After careful consideration, the HTML Working Group has decided that the goals for the next generation of forms are incompatible with preserving backwards compatibility with browsers designed for earlier versions of HTML.

August 1999

W3C has no intention to extend HTML 4 as such. Instead, further work is focusing on a reformulation of HTML in XML

November 1999

...while the ancestry of XHTML 2 comes from HTML 4, XHTML 1.0, and XHTML 1.1, it is not intended to be backward compatible with its earlier versions

August 2002

XHTML 2.0 seems to me the live proof that something is going wrong at W3C... I strongly suggest dropping all XHTML 2.0 efforts in favor of a new “ xHTML 5.0 ” language. Clearly a successor to HTML 4, feature-oriented, made for the web.

December 2002

The W3C had so far failed to address a need in the Web community: There is no language for Web applications ... I intend to do something about this (hopefully within a W3C context, although that will depend on the politics of the situation).

January 2004

The dream of a new web , based on XHTML+SVG+SMIL+XForms, is just that — a dream... The best way to help the Web is to incrementally improve the existing web standards ... so that web content authors can actually deploy new formats interoperably.

June 2004

We need to specify error handling behavior to ensure interoperability “even in the face of documents that do not comply to the letter of the specifications”.

Authors will write invalid content regardless of what we spec. So the spec states “what authors must not do, and then tells implementors what they must do when an author does it anyway”.

It is necessary to evolve HTML incrementally. The attempt to get the world to switch to XML , including quotes around attribute values and slashes in empty tags and namespaces all at once didn’t work ...

October 2006

More HTML history:

http://esw.w3.org/topic/HTML/history

HTML5 has a major focus on facilitating use of a browser as a Web application platform (or Web application runtime environment).

XHTML2 has a major focus on providing a general-purpose document language declarative mechanisms for enabling interactive features.

HTML5 support:

XHTML2 support:

The bottom line...

Some HTML5 differences...

HTML5 defines HTML as an abstract language with two standard syntaxes supported by browsers.

Similarly, applications can potentially represent HTML in memory in any number of ways.

However, there’s only one standard in-memory representation supported by browsers: The W3C DOM.

The HTML5 spec precisely defines the DOM representation that browsers must use to represent HTML content in memory.

<!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<meta charset="utf-8">

HTML5 features that work in browsers now...

Somewhat related work outside of the core HTML5 effort... 

以上です。 That’s it.