SlideShare a Scribd company logo
Dive into HTML5

Doris Chen Ph.D.
Developer Evangelist
Microsoft
http://blogs.msdn.com/dorischen/
@doristchen
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 15 years of experience in the software industry
  focusing on web technologies
 Spoke and published widely at HTML5 Dev, 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)
Agenda

         HTML5 Overview


         HTML5 Main Feature

         HTML5 Tools


         Summary and Resources




PAGE 3
HTML5 Overview
Where did HTML5 Come from?
 20 years of evolution: 1990 to 2010
HTML      2      3     3.2     4      4.01
                     XML     XHTML1          1.1     1SE   2
                             Web Forms 2           Web Apps 1 H HTML5
 W3C participate in HTML5 (2006)
    Formed working group to work with WHATWG (Web Hypertext
     Applications Technology Working Group) on HTML5 specification (2007)

 HTML4 + XHTML1 evolved into Web Apps 1 / HTML5
 2009 W3C dropped XHTML2 to focus on HTML5
6
W3C HTML Working Group

             •
             •
             •
             •
             •
100+ Specifications




                                           Geolocation
                                             ECMA
HTML   CSS                Web Apps   SVG
Microsoft Approach with HTML5
HTML5 in IE9
         HTML5                       CSS3                     SVG                       Others

• New Markup Elements      •   2D Transforms       • Shapes                   • ECMA Script 5 (all
• Canvas                                           • Clipping, Masking, and
                           •   Border Radius         Compositing                but Strict Mode)
• Audio
• Video                    •   Box-Shadow          • Transforms               • Native JSON
• Local Storage            •   Fonts (WOFF)        • Extensibility              support (IE8)
• Cross-Window Messaging                           • Gradients
                           •   Media Queries                                  • Performance API
• Text Selection APIs                              • Interactivity
• Parsing SVG in HTML      •   Multiple            • Linking and Views        • Geo-Location
                               Backgrounds         • Painting and Colors      • Data-uri (IE8)
                                                   • Paths
                           •   Namespaces                                     • DOM L2, L3
                                                   • Text
                           •   Opacity                                        • Selectors API L2
                           •   rgba(), hsl(),                                 • AJAX Navigation
                                                                                (IE8)
                               hsla()
                                                                              • DOMParser and
                           •   Selectors (IE8)
                                                                                XMLSerializer
                                                                              • ICC v2 and Color
                                                                                Profile
                                                                              • ARIA
                                       Hardware Acceleration
HTML5 in IE10 Platform Preview 3


        HTML5                   CSS3                 Others

• Application Cache   • 3D Transforms        • Advanced Hit Testing
• Drag&Drop           • Animations             APIs
• File API            • Flexible Box         • Async
• Forms Validation    • Floats               • Media Queries
• History             • Gradient               Listeners
• IndexedDB           • Grid                 • Web Performance
                                               APIs
• Sandbox             • Multi-Column
• Web Sockets         • Region
• Web Workers         • SVG Filter Effects
                      • Text Shadow
                      • Transitions
Demo
Real Life HTML5 Demo
HTML5 Main Feature
Dive Into HTML5
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
HTML Tags
   <div id=”header”>

   <div id=”nav”>




   <div
                       <div id=”article”>
   id=”sidebar”>




   <div id=”footer”>
New Semantic HTML Tags
   <header>

   <nav>




              <section>
   <aside>
                 <article>




   <footer>
HTML5 Semantic Tags
Supported in Internet Explorer 9
<body>                                </section>
 <header>                           </article>
  <hgroup>                          ...
   <h1>Doris Chen Dancing</h1>      </section>
   <h2>Funky Town!</h2>
  </hgroup>                          <aside>Aside items (i.e.
 </header>                         links)</aside>

 <nav>                              <figure>
 <ul>Navigation links</ul>           <img src="..." />
 </nav>                              <figcaption>Doris
                                   dancing</figcaption>
 <section>                          </figure>
 <article>
  <header>                          <footer>Copyright © 2011</footer>
    <h1>Can you believe it?</h1>
  </header>                        </body>
  <section>
  <mark>Doris dancing!</mark>
CSS3
 IE9
     2D Transforms
     Border Radius
     Box-Shadow
     Fonts (WOFF)
     Media Queries
     Multiple Backgrounds
     Namespaces
     Opacity
     rgba(), hsl(), hsla()
     Selectors (IE8)
 IE10 Platform Preview
     Grid
     Flexbox
     Gradient
     Multi-Column
     Floats
Demo
CSS3
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>
Compatibility Table
 HTML5 Audio




                                 10.0.648.24
vCurrent    9+    6+    5.0.4+                 11.01+
                                      +


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
Compatibility Table
HTML5 <video>




                                      10.0.648.24
vCurrent      9+     6+      5.0.4+                 11.01+
                                           +


VP8
(WebM)
                     Yes     No (*)      Yes         Yes
video
support
              Yes

H.264 video
                    No (*)    Yes       Yes (*)     No (*)
format
Demo

• Let’s have some fun with Video
Introduction to SVG
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
HTML5 <svg>
Let’s see a very simple example


 <svg width="400" height="200"
 xmlns="http://www.w3.org/2000/svg">
    <rect fill="red" x="20" y="20" width="100"
 height="75" />
    <rect fill="blue" x="50" y="50" width="100"
 height="75" />
 </svg>
SVG basics            SVG Feature

                       SVG 1.1 2nd Edition
                                                 IE9



SVG 1.1 2nd Edition   Document Structure
                                  in IE9
                                                 

in IE9                Basic Shapes               

                      Paths                      

                      Text                       

                      Transforms                 

                      Painting, Filling, Color   

                      Scripting                  

                      Styling                    

                      Gradients and Patterns     

                      Clipping and Masking       

                      Markers and Symbols        

                      Filter Effects

                      Declarative Animation

                      SVG Fonts
Demo
SVG Basics
The element, some styling & interactivity
Introduction to Canvas
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
Canvas Entire API
HTML5 <canvas>
Let’s see a very simple sample code


  <canvas id="myCanvas" width="200" height="200">
   Your browser doesn’t support Canvas, sorry.
  </canvas>

  <script type="text/javascript">
   var example = document.getElementById("myCanvas");
   var context = example.getContext("2d");
   context.fillStyle = "rgb(255,0,0)";
   context.fillRect(30, 30, 50, 50);
  </script>
Demo
Canvas Basics
The element, interactivity
When to Use What?
High level differences: SVG and Canvas
                Canvas                  SVG

  Abstraction   Pixel based (dynamic    Shape based
                bitmap)
  Elements      Single HTML element     Multiple graphical elements
                                        which become part of the
                                        Document Object Model
                                        (DOM)
  Driver        Modified through Script Modified through Script and
                only                    CSS
  Event Model   User Interaction is     User Interaction is
                granular (x,y)          abstracted (rect, path)


  Performance   Performance is better   Performance is better with
                with smaller surface    smaller number of objects
                and/or larger number of and/or larger surface.
                objects
The last piece to help you choose
Scenarios: Canvas and SVG
Use Case: Visualizing Data

 Maps
    Interactive Data Presentation
    High Speed Data


 <style type="text/css"media="screen">
     path:hover{fill:yellow;}
 </style>



 <canvas style="position:absolute;top:50px;left:50px"
 onclick="addWeather();" id="canvasGraph"height="500px"width="800px"/>

 for (var i= 0; i < weatherPatterns.length;i++) {
   weatherPatterns[i].x += Math.floor(Math.random() * 3)-1;
   weatherPatterns[i].y += Math.floor(Math.random() * 3) -1;
   myContext.drawImage(weatherImage[weatherPatterns[i].ImageIndex],
 weatherPatterns[i].x,
 weatherPatterns[i].y);
 }
Dive Into HTML5
HTML5 Tools
Tools to generate SVG
 You won’t be forced to type XML in notepad!

 Microsoft Visio
   Export as SVG

 Adobe Illustrator
    Save as SVG

 Inkspace
    Free Open source
     software
Tools to generate Canvas
You won’t be forced to type every JS primitives neither ;-)
 AI2Canvas plug-in :
  http://visitmix.com/labs/
  ai2canvas/
    export vector and bitmap
     artwork directly to an
     HTML5 canvas
    provides drawing,
     animation and coding
     options such as events so
     that you can build
     interactive, well-designed
     canvas-based web apps.
Tools
  F12 Developer Tools
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 45
Expression Web Super Preview




PAGE 46
Summary and Resources
Can I Use HTML5 Today?




PAGE 48
Resources
      • Started with HTML5
         • http://bit.ly/hpbwhv
      • Feature-specific demos
         • http://ie.microsoft.com/testdrive/
      • Real-world demos
         • http://www.beautyoftheweb.com/
      • Canvas demo by Community
         • http://www.canvasdemos.com/
      • Session Presentation and Demo
         • http://blogs.msdn.com/dorischen/




PAGE 49
Dive Into HTML5

More Related Content

What's hot (19)

PDF
Word camp nextweb
Panagiotis Grigoropoulos
 
PDF
Building Real-World Dojo Web Applications
Andrew Ferrier
 
PPTX
Html5v1
Ulises Torelli
 
KEY
Trendsetting: Web Design and Beyond
Andy Stratton
 
PDF
Simply Responsive CSS3
Denise Jacobs
 
PDF
CORE JAVA & ADVANCE JAVA
BALUJAINSTITUTE
 
PPTX
Colors In CSS3
Lea Verou
 
DOCX
CORE JAVA & ADVANCE JAVA
BALUJAINSTITUTE
 
PDF
Presenter manual web designing (specially for summer interns)
XPERT INFOTECH
 
PDF
Professional Frontend Engineering
Nate Koechley
 
PDF
Mansoura University CSED & Nozom web development sprint
Al Sayed Gamal
 
ODP
Html5
mikusuraj
 
PDF
Developing polyglot applications on Cloud Foundry (#oredev 2012)
Chris Richardson
 
PPTX
SeaJUG May 2012 mybatis
Will Iverson
 
PDF
Using Spring with NoSQL databases (SpringOne China 2012)
Chris Richardson
 
PPTX
Svcc 2013-css3-and-mobile
Oswald Campesato
 
PPTX
Hibernate in XPages
Toby Samples
 
PDF
Advanced Site Studio Class, June 18, 2012
Lee Klement
 
PPTX
HTML5 표준 소개
Chris
 
Word camp nextweb
Panagiotis Grigoropoulos
 
Building Real-World Dojo Web Applications
Andrew Ferrier
 
Trendsetting: Web Design and Beyond
Andy Stratton
 
Simply Responsive CSS3
Denise Jacobs
 
CORE JAVA & ADVANCE JAVA
BALUJAINSTITUTE
 
Colors In CSS3
Lea Verou
 
CORE JAVA & ADVANCE JAVA
BALUJAINSTITUTE
 
Presenter manual web designing (specially for summer interns)
XPERT INFOTECH
 
Professional Frontend Engineering
Nate Koechley
 
Mansoura University CSED & Nozom web development sprint
Al Sayed Gamal
 
Html5
mikusuraj
 
Developing polyglot applications on Cloud Foundry (#oredev 2012)
Chris Richardson
 
SeaJUG May 2012 mybatis
Will Iverson
 
Using Spring with NoSQL databases (SpringOne China 2012)
Chris Richardson
 
Svcc 2013-css3-and-mobile
Oswald Campesato
 
Hibernate in XPages
Toby Samples
 
Advanced Site Studio Class, June 18, 2012
Lee Klement
 
HTML5 표준 소개
Chris
 

Viewers also liked (15)

PDF
Practical HTML5: Using It Today
Doris Chen
 
PDF
Ajax Performance Tuning and Best Practices
Doris Chen
 
PDF
From 0 to Ember
Tracy Lee
 
PDF
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
Doris Chen
 
PDF
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Doris Chen
 
PDF
Performance Optimization and JavaScript Best Practices
Doris Chen
 
PDF
Create Influence, On Demand
Bernie Maloney
 
PDF
The Tale of 2 CLIs - Ember-cli and Angular-cli
Tracy Lee
 
PPTX
Html5 Fit: Get Rid of Love Handles
Chris Love
 
PDF
Silicon Valley Code Camp 2016 - MongoDB in production
Daniel Coupal
 
PPTX
Build Cross Platform Mobile Apps for iOS & Android with Xamarin & MvvmCross
Ishai Hachlili
 
ODP
ES6 PPT FOR 2016
Manoj Kumar
 
PPTX
Angular2
Oswald Campesato
 
PPTX
React js
Oswald Campesato
 
PDF
Introduction to Big Data
Mohammed Guller
 
Practical HTML5: Using It Today
Doris Chen
 
Ajax Performance Tuning and Best Practices
Doris Chen
 
From 0 to Ember
Tracy Lee
 
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
Doris Chen
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Doris Chen
 
Performance Optimization and JavaScript Best Practices
Doris Chen
 
Create Influence, On Demand
Bernie Maloney
 
The Tale of 2 CLIs - Ember-cli and Angular-cli
Tracy Lee
 
Html5 Fit: Get Rid of Love Handles
Chris Love
 
Silicon Valley Code Camp 2016 - MongoDB in production
Daniel Coupal
 
Build Cross Platform Mobile Apps for iOS & Android with Xamarin & MvvmCross
Ishai Hachlili
 
ES6 PPT FOR 2016
Manoj Kumar
 
Introduction to Big Data
Mohammed Guller
 
Ad

Similar to Dive Into HTML5 (20)

PDF
Dive into HTML5: SVG and Canvas
Doris Chen
 
KEY
about HTML5
Masato KONDO
 
PDF
Change by HTML5
dynamis
 
PPTX
HTML5 - A Whirlwind tour
Lohith Goudagere Nagaraj
 
PDF
HTML5 and Beyond
dynamis
 
PPTX
Html5 more than just html5 v final
Lohith Goudagere Nagaraj
 
KEY
WHAT IS HTML5? (at CSS Nite Osaka)
Shumpei Shiraishi
 
PPT
Html5 Whats around the bend
Raj Lal
 
PDF
HTML 5 Development for Windows Phone and Desktop
Doris Chen
 
PDF
WordCamp Thessaloniki2011 The NextWeb
George Kanellopoulos
 
PDF
East of Toronto .NET Usergroup - Put the 5 in HTML
Frédéric Harper
 
PDF
about:HTML&Firefox
dynamis
 
PDF
Echo HTML5
Nathan Smith
 
PPTX
HTML5: An Overview
Nagendra Um
 
PPTX
Bringing HTML5 alive in SharePoint
Chad Schroeder
 
PDF
HTML5がIE10/Windows 8にもたらすもの
Microsoft
 
PDF
HTML5 Intoduction for Web Developers
Sascha Corti
 
PDF
Building a Better Web with HTML5 and CSS3
Karambir Singh Nain
 
PDF
Repaso rápido a los nuevos estándares web
Pablo Garaizar
 
Dive into HTML5: SVG and Canvas
Doris Chen
 
about HTML5
Masato KONDO
 
Change by HTML5
dynamis
 
HTML5 - A Whirlwind tour
Lohith Goudagere Nagaraj
 
HTML5 and Beyond
dynamis
 
Html5 more than just html5 v final
Lohith Goudagere Nagaraj
 
WHAT IS HTML5? (at CSS Nite Osaka)
Shumpei Shiraishi
 
Html5 Whats around the bend
Raj Lal
 
HTML 5 Development for Windows Phone and Desktop
Doris Chen
 
WordCamp Thessaloniki2011 The NextWeb
George Kanellopoulos
 
East of Toronto .NET Usergroup - Put the 5 in HTML
Frédéric Harper
 
about:HTML&Firefox
dynamis
 
Echo HTML5
Nathan Smith
 
HTML5: An Overview
Nagendra Um
 
Bringing HTML5 alive in SharePoint
Chad Schroeder
 
HTML5がIE10/Windows 8にもたらすもの
Microsoft
 
HTML5 Intoduction for Web Developers
Sascha Corti
 
Building a Better Web with HTML5 and CSS3
Karambir Singh Nain
 
Repaso rápido a los nuevos estándares web
Pablo Garaizar
 
Ad

More from Doris Chen (19)

PDF
Practical tipsmakemobilefaster oscon2016
Doris Chen
 
PDF
Building Web Sites that Work Everywhere
Doris Chen
 
PDF
Angular mobile angular_u
Doris Chen
 
PDF
Lastest Trends in Web Development
Doris Chen
 
PDF
Angular or Backbone: Go Mobile!
Doris Chen
 
PDF
OSCON Presentation: Developing High Performance Websites and Modern Apps with...
Doris Chen
 
PDF
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Doris Chen
 
PDF
Developing High Performance Websites and Modern Apps with JavaScript and HTML5
Doris Chen
 
PDF
What Web Developers Need to Know to Develop Native HTML5/JS Apps
Doris Chen
 
PDF
Windows 8 Opportunity
Doris Chen
 
PDF
Wins8 appfoforweb fluent
Doris Chen
 
PDF
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Doris Chen
 
PDF
What Web Developers Need to Know to Develop Windows 8 Apps
Doris Chen
 
PDF
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Doris Chen
 
PDF
Building Beautiful and Interactive Windows 8 apps with JavaScript, HTML5 & CSS3
Doris Chen
 
PDF
Introduction to CSS3
Doris Chen
 
PDF
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Doris Chen
 
PDF
Practical HTML5: Using It Today
Doris Chen
 
PDF
Developing Revolutionary Web Applications using Comet and Ajax Push
Doris Chen
 
Practical tipsmakemobilefaster oscon2016
Doris Chen
 
Building Web Sites that Work Everywhere
Doris Chen
 
Angular mobile angular_u
Doris Chen
 
Lastest Trends in Web Development
Doris Chen
 
Angular or Backbone: Go Mobile!
Doris Chen
 
OSCON Presentation: Developing High Performance Websites and Modern Apps with...
Doris Chen
 
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Doris Chen
 
Developing High Performance Websites and Modern Apps with JavaScript and HTML5
Doris Chen
 
What Web Developers Need to Know to Develop Native HTML5/JS Apps
Doris Chen
 
Windows 8 Opportunity
Doris Chen
 
Wins8 appfoforweb fluent
Doris Chen
 
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Doris Chen
 
What Web Developers Need to Know to Develop Windows 8 Apps
Doris Chen
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Doris Chen
 
Building Beautiful and Interactive Windows 8 apps with JavaScript, HTML5 & CSS3
Doris Chen
 
Introduction to CSS3
Doris Chen
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Doris Chen
 
Practical HTML5: Using It Today
Doris Chen
 
Developing Revolutionary Web Applications using Comet and Ajax Push
Doris Chen
 

Recently uploaded (20)

PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 

Dive Into HTML5

  • 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: [email protected]  Has over 15 years of experience in the software industry focusing on web technologies  Spoke and published widely at HTML5 Dev, 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 HTML5 Overview HTML5 Main Feature HTML5 Tools Summary and Resources PAGE 3
  • 5. Where did HTML5 Come from?  20 years of evolution: 1990 to 2010 HTML 2 3 3.2 4 4.01 XML XHTML1 1.1 1SE 2 Web Forms 2 Web Apps 1 H HTML5  W3C participate in HTML5 (2006)  Formed working group to work with WHATWG (Web Hypertext Applications Technology Working Group) on HTML5 specification (2007)  HTML4 + XHTML1 evolved into Web Apps 1 / HTML5  2009 W3C dropped XHTML2 to focus on HTML5
  • 6. 6
  • 7. W3C HTML Working Group • • • • •
  • 8. 100+ Specifications Geolocation ECMA HTML CSS Web Apps SVG
  • 10. HTML5 in IE9 HTML5 CSS3 SVG Others • New Markup Elements • 2D Transforms • Shapes • ECMA Script 5 (all • Canvas • Clipping, Masking, and • Border Radius Compositing but Strict Mode) • Audio • Video • Box-Shadow • Transforms • Native JSON • Local Storage • Fonts (WOFF) • Extensibility support (IE8) • Cross-Window Messaging • Gradients • Media Queries • Performance API • Text Selection APIs • Interactivity • Parsing SVG in HTML • Multiple • Linking and Views • Geo-Location Backgrounds • Painting and Colors • Data-uri (IE8) • Paths • Namespaces • DOM L2, L3 • Text • Opacity • Selectors API L2 • rgba(), hsl(), • AJAX Navigation (IE8) hsla() • DOMParser and • Selectors (IE8) XMLSerializer • ICC v2 and Color Profile • ARIA Hardware Acceleration
  • 11. HTML5 in IE10 Platform Preview 3 HTML5 CSS3 Others • Application Cache • 3D Transforms • Advanced Hit Testing • Drag&Drop • Animations APIs • File API • Flexible Box • Async • Forms Validation • Floats • Media Queries • History • Gradient Listeners • IndexedDB • Grid • Web Performance APIs • Sandbox • Multi-Column • Web Sockets • Region • Web Workers • SVG Filter Effects • Text Shadow • Transitions
  • 15. 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
  • 16. HTML Tags <div id=”header”> <div id=”nav”> <div <div id=”article”> id=”sidebar”> <div id=”footer”>
  • 17. New Semantic HTML Tags <header> <nav> <section> <aside> <article> <footer>
  • 18. HTML5 Semantic Tags Supported in Internet Explorer 9 <body> </section> <header> </article> <hgroup> ... <h1>Doris Chen Dancing</h1> </section> <h2>Funky Town!</h2> </hgroup> <aside>Aside items (i.e. </header> links)</aside> <nav> <figure> <ul>Navigation links</ul> <img src="..." /> </nav> <figcaption>Doris dancing</figcaption> <section> </figure> <article> <header> <footer>Copyright © 2011</footer> <h1>Can you believe it?</h1> </header> </body> <section> <mark>Doris dancing!</mark>
  • 19. CSS3  IE9  2D Transforms  Border Radius  Box-Shadow  Fonts (WOFF)  Media Queries  Multiple Backgrounds  Namespaces  Opacity  rgba(), hsl(), hsla()  Selectors (IE8)  IE10 Platform Preview  Grid  Flexbox  Gradient  Multi-Column  Floats
  • 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.24 vCurrent 9+ 6+ 5.0.4+ 11.01+ + 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.24 vCurrent 9+ 6+ 5.0.4+ 11.01+ + VP8 (WebM) Yes No (*) Yes Yes video support Yes H.264 video No (*) Yes Yes (*) No (*) format
  • 24. Demo • Let’s have some fun with Video
  • 26. 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
  • 27. HTML5 <svg> Let’s see a very simple example <svg width="400" height="200" xmlns="http://www.w3.org/2000/svg"> <rect fill="red" x="20" y="20" width="100" height="75" /> <rect fill="blue" x="50" y="50" width="100" height="75" /> </svg>
  • 28. SVG basics SVG Feature SVG 1.1 2nd Edition IE9 SVG 1.1 2nd Edition Document Structure in IE9  in IE9 Basic Shapes  Paths  Text  Transforms  Painting, Filling, Color  Scripting  Styling  Gradients and Patterns  Clipping and Masking  Markers and Symbols  Filter Effects Declarative Animation SVG Fonts
  • 29. Demo SVG Basics The element, some styling & interactivity
  • 31. 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
  • 33. HTML5 <canvas> Let’s see a very simple sample code <canvas id="myCanvas" width="200" height="200"> Your browser doesn’t support Canvas, sorry. </canvas> <script type="text/javascript"> var example = document.getElementById("myCanvas"); var context = example.getContext("2d"); context.fillStyle = "rgb(255,0,0)"; context.fillRect(30, 30, 50, 50); </script>
  • 35. When to Use What?
  • 36. High level differences: SVG and Canvas Canvas SVG Abstraction Pixel based (dynamic Shape based bitmap) Elements Single HTML element Multiple graphical elements which become part of the Document Object Model (DOM) Driver Modified through Script Modified through Script and only CSS Event Model User Interaction is User Interaction is granular (x,y) abstracted (rect, path) Performance Performance is better Performance is better with with smaller surface smaller number of objects and/or larger number of and/or larger surface. objects
  • 37. The last piece to help you choose
  • 39. Use Case: Visualizing Data  Maps  Interactive Data Presentation  High Speed Data <style type="text/css"media="screen"> path:hover{fill:yellow;} </style> <canvas style="position:absolute;top:50px;left:50px" onclick="addWeather();" id="canvasGraph"height="500px"width="800px"/> for (var i= 0; i < weatherPatterns.length;i++) { weatherPatterns[i].x += Math.floor(Math.random() * 3)-1; weatherPatterns[i].y += Math.floor(Math.random() * 3) -1; myContext.drawImage(weatherImage[weatherPatterns[i].ImageIndex], weatherPatterns[i].x, weatherPatterns[i].y); }
  • 42. Tools to generate SVG You won’t be forced to type XML in notepad!  Microsoft Visio  Export as SVG  Adobe Illustrator  Save as SVG  Inkspace  Free Open source software
  • 43. Tools to generate Canvas You won’t be forced to type every JS primitives neither ;-)  AI2Canvas plug-in : http://visitmix.com/labs/ ai2canvas/  export vector and bitmap artwork directly to an HTML5 canvas  provides drawing, animation and coding options such as events so that you can build interactive, well-designed canvas-based web apps.
  • 44. Tools F12 Developer Tools
  • 45. 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 45
  • 46. Expression Web Super Preview PAGE 46
  • 48. Can I Use HTML5 Today? PAGE 48
  • 49. Resources • Started with HTML5 • http://bit.ly/hpbwhv • Feature-specific demos • http://ie.microsoft.com/testdrive/ • Real-world demos • http://www.beautyoftheweb.com/ • Canvas demo by Community • http://www.canvasdemos.com/ • Session Presentation and Demo • http://blogs.msdn.com/dorischen/ PAGE 49