Demo and sample code are availalbe to download at http://bit.ly/juGbPA.
Developers keep hearing a lot about HTML5, but many don’t know what it actually means or is truly capable of. In this deep dive you will learn the current status of HTML5, how to use HTML5 and how new web standards help solve existing challenges on the web. You will also preview the next emerging standards and understand Microsoft implementation approach through prototypes. In this session, Doris will cover:
•What is the real potential of HTML5 using CSS3, Canvas, SVG, Video, Audio, and JavaScript?
•How can HTML5 and IE make your site look better and work faster?
•Come and see a collection of the best HTML5 web sites around the Web on Games, Videos, Movies, Comics, Travel, Music and Art
•Be inspired by crazy web sites, stunning prototypes and futuristic concepts
Expect a lot of demos and code!
1. Dive into HTML5
Doris Chen Ph.D.
Developer Evangelist
Microsoft
http://blogs.msdn.com/dorischen/
@doristchen
2. Who am I?
Developer Evangelist at Microsoft based in Silicon
Valley, CA
Blog: http://blogs.msdn.com/b/dorischen/
Twitter @doristchen
Email: doris.chen@microsoft.com
Has over 13 years of experience in the software industry
focusing on web technologies
Spoke and published widely at JavaOne, O'Reilly, Silicon
Valley Code Camp, SD West, SD Forum and worldwide
User Groups meetings
Doris received her Ph.D. from the University of California
at Los Angeles (UCLA)
3. Agenda
What is HTML5
Dive into HTML5
HTML5 Tools
Summary and Resources
PAGE 3
8. HTML5 Semantics
Semantic Document Structure
HTML5 introduces a new semantic
structure
Replacing the use of DIV, SPAN
HEADER
and other elements with class and
ID attributes
New elements include header, nav, NAV
article, section, aside, and footer
ARTICLE
ASIDE
FOOTER
13. Canvas basics
Dynamic bitmap with JS
Allow drawing into a bitmap area
See it as a dynamic PNG ;-)
JavaScript APIs & drawing primitives
Rectangles, lines, fills, arcs, Bezier curves, etc.
Immediate mode : « Fire and Forget »
It does not remember what you drew last.
It’s up to you to maintain your objects tree
This is a black box : content not visible into the DOM
Beware of accessibility issues
Simple API: 45 methods, 21 attributes
16. SVG basics
Scalable Vector Graphics
Scalable Vector Graphic
To draw 2D vector graphics using XML
“retained mode” : the objects tree is kept in memory
Full DOM support
Access to the SVG elements through the DOM
SVG elements can be styled with CSS & can be
decorated with ARIA
Included in HTML5 spec
Native support in IE9 and other modern browsers
Can be used from an external .svg file or in-line in
the document
19. Combination/Crossover Scenarios
More subtle differences
Charts and Graphs
SVG better for interaction, XML data loading & for
printing
Canvas could be a faster rendering choice for some
browsers
Two-Dimensional Games
Canvas offers a more familiar experience to game
developers (low level APIs, immediate mode as XNA,
etc.)
SVG does a lot of DOM operations and cost more
memory
21. HTML5 Video & Audio
<audio <video
src= src= The url to the audio or video
width= The width of the video element
height= The height of the video element
poster= The url to the thumbnail of the video
preload= preload= (none, metadata, auto) Start downloading
autoplay autoplay Audio or video should play immediately
loop loop Audio or video should return to start and play
controls controls Will show controls (play, pause, scrub bar)
> >
… …
</audio> </video>
22. Compatibility Table
HTML5 Audio
10.0.648.20
vCurrent 9 4 5.0.4 11.01
4
MP3 audio
Yes No Yes Yes No (*)
support
WAV PCM
audio No Yes Yes Yes Yes
support
AAC audio
Yes No Yes Yes No (*)
format
23. Compatibility Table
HTML5 <video>
10.0.648.20
vCurrent 9 4 5.0.4 11.01
4
VP8
(WebM)
Yes No (*) Yes Yes
video
support
Yes
H.264 video
No (*) Yes Yes (*) No (*)
format
29. F12 Developer Tools
Testing from Internet Explorer 9 to 7
Browser Mode
Changes the rendering
engine only
Great list of PolyFills
Changes the rendering engine
and user agent string
PAGE 31