SlideShare uma empresa Scribd logo
1 de 69
Baixar para ler offline
HTML5, XHTML2
Learning from history how to
 drive the future of the Web
Michael(tm) Smith
mike@w3.org
http://people.w3.org/mike
sideshowbarker on Slideshare,
Twitter, etc.
W3C “Interaction” domain
• HTML Working Group
• Web Applications Working Group
• CSS Working Group
• SVG Working Group
• ...
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
• Support existing content
• Ensure interoperability
• Precisely define UA behavior
• Handle errors (non-draconically)
• Evolution not revolution
“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

• Use existing XML facilities rather
  than duplicating them (implies
  namespace support)
• Less scripting (vs declarative approach)
• Integration with Semantic Web
What does “declarative”
       mean?
Declarative programming
   success story: SVG
 (XSLT also? XForms?)
HTML5 and XHTML2
   in contrast...
Things HTML5 doesn’t do
• Does not favor XML facilities
• Does not avoid scripting
• Does not consider integration
 with the SemWeb a priority
• No arbitrary namespaces
Things XHTML2 doesn’t do
• Does not support existing content in
  the same way that HTML5 does
• Does not precisely define UA behavior
• Does not handle errors non-
  draconically (uses “catch fire and fail”
  error handling)
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 these are errors?


•
Well-formed XML:
     <input disabled="disabled">

•
Empty attribute: <input disabled>

•
Without quotes: <input value=yes>

•
Single quotes: <input type='checkbox'>

•
Double quotes: <input name="be evil">
This 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 sites
   contain 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
◦   I think users and application builders should have a choice with what they do with invalid data. I cannot see
    how a user or application builder can be disadvantaged by being provided with this choice, and I therefore
    plan to continue to provide it even if the spec says that this
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

• specific native browser
 support being implemented by
 all major browser vendors
• most recent WD: 2009
XHTML2 support
• no specific client-side native
    browser support from any major
    browser vendor
•   … but possible to “bolt on” some
    level of support using CSS+JS
•   most recent WD: 2006
The bottom line...
HTML5 is the only HTML
dialect that will be natively
supported in browsers on
the client side.
XHTML2 will likely remain useful
more as a choice for authoring
and storing documents on the
server side and down-
transforming them to HTML+JS.
Some HTML5 differences...
HTML5 defines HTML as an abstract
language with two standard
syntaxes supported by browsers:

• a text/html syntax, with parsing
 rules defined by the HTML5 spec
• an XML syntax, with parsing rules
 defined by the XML spec
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
• canvas element: scriptable image
• video and audio elements: embed
  interactive video and audio
  easily, without plugins

• new form attributes & APIs, for
  client-side form validation & new
  native form widgets in browsers
• API for offline Web applications:
  ApplicationCache

• APIs for client-side data storage
  per-session (sessionStorage)
  and persistently across sessions
  (localStorage and client-side
  SQL database storage)
• postMessage() mechanism for
 cross-document messaging

• API for native drag-and-drop
 (without need for script library)

• native getElementsByClassName
• more...
• accesskey and spellcheck
• keygen element
• how to handle SVG in text/html
• Web Storage, Web Sockets,
 Server-Sent Events moved out
• Mozilla development build
 (Minefield) with conformant
 HTML5 parser (same parser as
 validator.nu)

• incremental updates/refinements
 being made to validator.nu code
Somewhat related
work outside of the
core HTML5 effort...
• Web Workers
• SVG in Opera, Mozilla, WebKit
• CSS transforms/animations
• CSS3 Selectors
• CSS3 Selectors API
• XMLHttpRequest level 1 and 2
• Cross-Origin Resource Sharing
• Geolocation API
• native JSON support in browsers
• JavaScript 3.1 “Harmony”
That’s it.
Thanks.

Mais conteúdo relacionado

Mais procurados

Mais procurados (14)

Dhtml
DhtmlDhtml
Dhtml
 
HTML standards
HTML standardsHTML standards
HTML standards
 
Web engineering notes unit 3
Web engineering notes unit 3Web engineering notes unit 3
Web engineering notes unit 3
 
HTML 5
HTML 5HTML 5
HTML 5
 
Html5
Html5Html5
Html5
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)
 
Dhtml
DhtmlDhtml
Dhtml
 
Unit 2 dhtml
Unit 2 dhtmlUnit 2 dhtml
Unit 2 dhtml
 
Introduction to DOM
Introduction to DOMIntroduction to DOM
Introduction to DOM
 
DHTML
DHTMLDHTML
DHTML
 
HTML validation, microformats, jQuery
HTML validation, microformats, jQueryHTML validation, microformats, jQuery
HTML validation, microformats, jQuery
 
Introduction to HTML5/CSS3 In Drupal 7
Introduction to HTML5/CSS3 In Drupal 7Introduction to HTML5/CSS3 In Drupal 7
Introduction to HTML5/CSS3 In Drupal 7
 
introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5
 

Semelhante a HTML5 and XHTML2

IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...ijceronline
 
HTML5 vs Flash : Term paper at VGSOM, IIT Kharagpur
HTML5 vs Flash : Term paper at VGSOM, IIT KharagpurHTML5 vs Flash : Term paper at VGSOM, IIT Kharagpur
HTML5 vs Flash : Term paper at VGSOM, IIT KharagpurKanishka Chakraborty
 
Everything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 minEverything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 minEdgar Parada
 
The Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for BeginnersThe Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for BeginnersRasin Bekkevold
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5Ravi Raj
 
HTML5, How to rethink your web strategy
HTML5, How to rethink your web strategyHTML5, How to rethink your web strategy
HTML5, How to rethink your web strategyFabernovel
 
Oreilly -html_and_xhtml_pocket_reference_%28_december_2009%29_%28at_tica%29_1
Oreilly  -html_and_xhtml_pocket_reference_%28_december_2009%29_%28at_tica%29_1Oreilly  -html_and_xhtml_pocket_reference_%28_december_2009%29_%28at_tica%29_1
Oreilly -html_and_xhtml_pocket_reference_%28_december_2009%29_%28at_tica%29_1gajapandiyan
 

Semelhante a HTML5 and XHTML2 (20)

IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
Html5
Html5Html5
Html5
 
XHTML Web Designs.pdf
XHTML Web Designs.pdfXHTML Web Designs.pdf
XHTML Web Designs.pdf
 
WEB Module 1.pdf
WEB Module 1.pdfWEB Module 1.pdf
WEB Module 1.pdf
 
HTML5 Introduction – Features and Resources for HTML5
HTML5 Introduction – Features and Resources for HTML5HTML5 Introduction – Features and Resources for HTML5
HTML5 Introduction – Features and Resources for HTML5
 
HTML5 vs Flash : Term paper at VGSOM, IIT Kharagpur
HTML5 vs Flash : Term paper at VGSOM, IIT KharagpurHTML5 vs Flash : Term paper at VGSOM, IIT Kharagpur
HTML5 vs Flash : Term paper at VGSOM, IIT Kharagpur
 
Everything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 minEverything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 min
 
The Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for BeginnersThe Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for Beginners
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5
 
Qnx html5 hmi
Qnx html5 hmiQnx html5 hmi
Qnx html5 hmi
 
HTML5, How to rethink your web strategy
HTML5, How to rethink your web strategyHTML5, How to rethink your web strategy
HTML5, How to rethink your web strategy
 
Oreilly -html_and_xhtml_pocket_reference_%28_december_2009%29_%28at_tica%29_1
Oreilly  -html_and_xhtml_pocket_reference_%28_december_2009%29_%28at_tica%29_1Oreilly  -html_and_xhtml_pocket_reference_%28_december_2009%29_%28at_tica%29_1
Oreilly -html_and_xhtml_pocket_reference_%28_december_2009%29_%28at_tica%29_1
 
Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 
Html5 Seminario Tid
Html5  Seminario TidHtml5  Seminario Tid
Html5 Seminario Tid
 
Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 

Último

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Último (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

HTML5 and XHTML2

  • 1. HTML5, XHTML2 Learning from history how to drive the future of the Web
  • 3. W3C “Interaction” domain • HTML Working Group • Web Applications Working Group • CSS Working Group • SVG Working Group • ...
  • 4. From 1997 through the end of 2006, work on HTML within the W3C focused exclusively on the XHTML dialect.
  • 5. A government in exile...
  • 6. From June 2004 to March 2007, work on the (non-XHTML) HTML language took place outside of the W3C.
  • 7. About HTML5 (and HTML forms)...
  • 8. HTML5 in the words of the W3C HTML WG...
  • 10. HTML design principles • Support existing content • Ensure interoperability • Precisely define UA behavior • Handle errors (non-draconically) • Evolution not revolution
  • 11. “Draconically”= “Draconian”= “catch fire and fail”
  • 12. About XHTML2 (and XForms)...
  • 13. XHTML2 in the words of the W3C XHTML WG...
  • 15. XHTML2 Design Aims • Use existing XML facilities rather than duplicating them (implies namespace support) • Less scripting (vs declarative approach) • Integration with Semantic Web
  • 17. Declarative programming success story: SVG (XSLT also? XForms?)
  • 18. HTML5 and XHTML2 in contrast...
  • 19. Things HTML5 doesn’t do • Does not favor XML facilities • Does not avoid scripting • Does not consider integration with the SemWeb a priority • No arbitrary namespaces
  • 20. Things XHTML2 doesn’t do • Does not support existing content in the same way that HTML5 does • Does not precisely define UA behavior • Does not handle errors non- draconically (uses “catch fire and fail” error handling)
  • 21. Important point: XHTML2 is a different language than XHTML1
  • 22. ...“different language” in that XHTML2 does not fully support existing XHTML1 content (not backward compatible)
  • 23. A representative statement about the difference in philosophy: “HTML is the assembly language of the Web.”
  • 24.
  • 25. Important point: in some cases HTML5 offers a choice of both declarative and scripting approaches.
  • 27. Which of these are errors? • Well-formed XML: <input disabled="disabled"> • Empty attribute: <input disabled> • Without quotes: <input value=yes> • Single quotes: <input type='checkbox'> • Double quotes: <input name="be evil">
  • 28. This is a real error <i><b>misnested tags</i></b>
  • 29. HTML5 parsers can handle real errors interoperably and gracefully.
  • 30. Why is it important to handle errors?
  • 31. More than 93% of Alexa Top 500 sites contain HTML conformance errors.
  • 33. (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 ◦ I think users and application builders should have a choice with what they do with invalid data. I cannot see how a user or application builder can be disadvantaged by being provided with this choice, and I therefore plan to continue to provide it even if the spec says that this
  • 34. 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
  • 35. W3C has no intention to extend HTML 4 as such. Instead, further work is focusing on a reformulation of HTML in XML November 1999
  • 36. ...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
  • 37. 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
  • 38. 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
  • 39. 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
  • 40. 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”.
  • 41. 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”.
  • 42. 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
  • 44. HTML5 has a major focus on facilitating use of a browser as a Web application platform (or Web application runtime environment).
  • 45. XHTML2 has a major focus on providing a general- purpose document language declarative mechanisms for enabling interactive features.
  • 46. HTML5 support • specific native browser support being implemented by all major browser vendors • most recent WD: 2009
  • 47. XHTML2 support • no specific client-side native browser support from any major browser vendor • … but possible to “bolt on” some level of support using CSS+JS • most recent WD: 2006
  • 49. HTML5 is the only HTML dialect that will be natively supported in browsers on the client side.
  • 50. XHTML2 will likely remain useful more as a choice for authoring and storing documents on the server side and down- transforming them to HTML+JS.
  • 52. HTML5 defines HTML as an abstract language with two standard syntaxes supported by browsers: • a text/html syntax, with parsing rules defined by the HTML5 spec • an XML syntax, with parsing rules defined by the XML spec
  • 53. Similarly, applications can potentially represent HTML in memory in any number of ways.
  • 54. 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.
  • 55. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/ DTD/xhtml1-transitional.dtd">
  • 59. HTML5 features that work in browsers now
  • 60. • canvas element: scriptable image • video and audio elements: embed interactive video and audio easily, without plugins • new form attributes & APIs, for client-side form validation & new native form widgets in browsers
  • 61. • API for offline Web applications: ApplicationCache • APIs for client-side data storage per-session (sessionStorage) and persistently across sessions (localStorage and client-side SQL database storage)
  • 62. • postMessage() mechanism for cross-document messaging • API for native drag-and-drop (without need for script library) • native getElementsByClassName • more...
  • 63. • accesskey and spellcheck • keygen element • how to handle SVG in text/html • Web Storage, Web Sockets, Server-Sent Events moved out
  • 64. • Mozilla development build (Minefield) with conformant HTML5 parser (same parser as validator.nu) • incremental updates/refinements being made to validator.nu code
  • 65. Somewhat related work outside of the core HTML5 effort...
  • 66. • Web Workers • SVG in Opera, Mozilla, WebKit • CSS transforms/animations • CSS3 Selectors • CSS3 Selectors API
  • 67. • XMLHttpRequest level 1 and 2 • Cross-Origin Resource Sharing • Geolocation API • native JSON support in browsers • JavaScript 3.1 “Harmony”