HTML5 Dave Ross Fox Valley Computing Professionals December 14, 2010
Drama
Politics
Betrayal
• 1991 - "HTML Tags"
• 1991 - "HTML Tags" • 1995 - HTML 2.0
• 1991 - "HTML Tags" • 1995 - HTML 2.0 • 1997 - HTML 3.2
• 1991 - "HTML Tags" • 1995 - HTML 2.0 • 1997 - HTML 3.2 • 1997 - HTML 4.0
• 1991 - "HTML Tags" • 1995 - HTML 2.0 • 1997 - HTML 3.2 • 1997 - HTML 4.0 • 1998 - HTML 4.0 (revised)
• 1991 - "HTML Tags" • 1995 - HTML 2.0 • 1997 - HTML 3.2 • 1997 - HTML 4.0 • 1998 - HTML 4.0 (revised) • 1999 - HTML 4.01
XHTML
XHTML • Formal syntax (XML) • Machine friendly • MIME types, xmlns, strict/transitional
• 2000 - XHTML 1.0 • 2001 - XHTML 1.1 • 2002 - XHTML 2.0/XForms/ XFrames
2004
Should the W3C develop declarative extensions to HTML and CSS and imperative extensions to DOM, to address medium level Web Application requirements, as opposed to sophisticated, fully-
Should the W3C develop declarative extensions to HTML and CSS and imperative extensions to DOM, to address medium level Web Application requirements, as opposed to sophisticated, fully- No.
WHATWG Web Hypertext Application Technology Working Group
• Mozilla Foundation • Apple • Google • Opera
• Mozilla Foundation • Apple • Google • Opera Microsoft cited lack of a patent
Seven Principles
Seven Principles • Backwards compatibility, clear migration path
Seven Principles • Backwards compatibility, clear migration path • Well-defined error handling
Seven Principles • Backwards compatibility, clear migration path • Well-defined error handling • Users should not be exposed to authoring errors
Seven Principles • Backwards compatibility, clear migration path • Well-defined error handling • Users should not be exposed to authoring errors • Practical use
Seven Principles • Backwards compatibility, clear migration path • Well-defined error handling • Users should not be exposed to authoring errors • Practical use • Scripting is here to stay
Seven Principles • Backwards compatibility, clear migration path • Well-defined error handling • Users should not be exposed to authoring errors • Practical use • Scripting is here to stay • Device-specific profiling should be avoided
Seven Principles • Backwards compatibility, clear migration path • Well-defined error handling • Users should not be exposed to authoring errors • Practical use • Scripting is here to stay • Device-specific profiling should be avoided • Open process
In case of conflict, consider users over authors over implementors over specifiers over theoretical purity. HTML Design Principles (2007)
2006 • XHTML 2 still a draft • W3C interested in HTML5 • Some things are clearer with hindsight of several years. It is necessary to evolve HTML incrementally. The attempt to get the world to switch to XML...didn't work.
2007
2007 • WHATWG sent HTML5 draft to W3C
2007 • WHATWG sent HTML5 draft to W3C • Working group assigned
2007 • WHATWG sent HTML5 draft to W3C • Working group assigned • 2012 - W3C Candidate Recommendation
2007 • WHATWG sent HTML5 draft to W3C • Working group assigned • 2012 - W3C Candidate Recommendation • 2022 - W3C Recommendation
2009 - XHTML 2 killed "The ones that win are the ones that ship." - Mark Pilgrim
HTML5
Most HTML5 features work today* * in progressive browsers
Most HTML5 features work today* * in everything but Internet Explorer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="..." • alternate • nofollow • archives • noreferrer • author • pingback • external • prefetch • prev, next, • search start • icon • sidebar • license • tag
<body>
Semantic Elements • <header> & <footer> • <section> • <nav>, <menu> & <command> • <article> & <aside> • <hgroup> (heading group)
Semantic Elements • <time> • <mark> • <meter> • <progress>
Not recognized in all browsers*
Not recognized in all browsers* * I'm looking at you, Internet Explorer
HTML5 Shiv http://html5shiv.googlecode.com/svn/trunk/html5
<input type="..." /> • text, password, checkbox, radio, file • search, url, tel, email • range • color • date, time, datetime, month, week
Backwards compatible
<input type="text" placeholder="enter your search terms" />
<input type="text" autofocus="autofocus" />
<canvas> • Drawing surface with Javascript API • 2D & 3D (WebGL) drawing contexts • Text • Points, lines, and paths • Pictures • Animation
<canvas id="game" width="300" height="200"> Your browser doesn't support canvas* </canvas>
<canvas id="game" width="300" height="200"> Your browser doesn't support canvas* </canvas> * guess
explorercanvas http://code.google.com/p/explorercanvas/
<script type="text/javascript"> var game = document.getElementById("game"); var context = game.getContext('2d'); context.fillRect(50, 25, 150, 100); </script>
<audio>
<audio autoplay="autoplay" controls="controls"> <source src="file.ogg" /> <source src="file.aac" /> <source src="file.mp3" /> </audio>
<video>
<video src="file.mov" width="320" height="200" controls="controls" autoplay="autoplay" preload="none"> </video>
<video width="320" height="200"> <source src="file.mov" /> <source src="file.ogg" /> <source src="file.vp8" /> </video>
Offline Applications
Manifest • <html manifest="my.manifest"> • Served as text/cache-manifest • AddType text/cache-manifest .manifest
Manifest Contents CACHE MANIFEST CACHE: /clock.css /clock.js /clock-face.jpg
Manifest Sections • CACHE: Files that should always be available offline • NETWORK: Files that must be accessed over the network and cannot be cached (server-side scripts) • FALLBACK: Substitute files when running offline
Javascript APIs • History (manipulate browser history) • Geolocation (GPS, cell towers, wifi) • Local storage (database in the browser) • Web sockets (communication w/servers) • Web workers (Javascript multithreading) • Drag & drop
This is only the beginning.
Dive Into HTML5 • Free guide to HTML5 history and features • No PDF/ePub version
HTML5 Up and Running • Expanded version of Dive Into HTML5 • Available in paperback or e- book • Save 35% with discount code DSUG
Dave Ross • Lead Developer at Straight North • Building web sites since 1996 • Cat shelter volunteer • Collects old computers • davidmichaelross.com • daveross.tel
slideshare.net/ csixty4 This presentation and my previous HTML5 & Canvas presentations

HTML5 History & Features