SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
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 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)
Agenda

         What is HTML5


         Dive into HTML5


         HTML5 Tools


         Summary and Resources


PAGE 3
100+ Specifications
Demo
Web Standards in action
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
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>
Demo
Semantics
Basic HTML5 page
CSS3
 IE9
     Selectors
     Backgrounds and Borders
     Fonts (WOFF)
     Media Queries
     Color
     Transformations
     Namespaces
     Values and Units
 IE10 Platform Preview
   Multi-column Layout
   Grid Layout and CSS3 Flexible Box Layout
   Gradients
   Transitions and CSS3 3D Transforms
Demo
CSS3
Medium query
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
Demo
Canvas Basics
The element, interactivity
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
Demo
SVG Basics
The element, some styling & interactivity
Scenarios: Canvas and SVG
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
Performance Comparison
The last piece to help you choose
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.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
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
Demo

• Video, Fallback, Styled Video,
  Canvas, Animation
Frameworks and Tools
 Modernizr
     www.modernizr.com
 Shipping with ASP.NET MVC 3 Tools update
Fallback: Polyfills and Shims

 Polyfills
      github.com/Modernizr/Modernizr/wiki/HTML5-Cross-
       browser-Polyfills
HTML5 Tools
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 31
Expression Web Super Preview




PAGE 32
Demo
Expression Web Super Preview
Test in all major browsers with different version within one
view
Innovate with Emerging Standards
HTML5 Labs
Summary and Resources
Can I Use HTML5 Today?




PAGE 36
Resources

          • Started with IE9 and HTML5
             • http://bit.ly/hpbwhv
          • Whitepaper focused for developers
             • http://msdn.microsoft.com/en-us/ie/ff468705.aspx
          • Feature-specific demos
             • http://ie.microsoft.com/testdrive/
          • Real-world demos
             • http://www.beautyoftheweb.com/
          • Blogs
             • http://blogs.msdn.com/b/ie/
          • HTML5 Labs
             • http://html5labs.interoperabilitybridges.com/
PAGE 37
Upcoming HTML5 Web Camps
 1 Days HTML5 Web Camp
  June 10, 2011, Colorado Springs, Co
  June 23, 2011, Irvine, CA
    http://bit.ly/jo5KFM
Dive into HTML5

Contenu connexe

Plus de Doris Chen

Wins8 appfoforweb fluent
Wins8 appfoforweb fluentWins8 appfoforweb fluent
Wins8 appfoforweb fluent
Doris Chen
 
Dive Into HTML5
Dive Into HTML5Dive Into HTML5
Dive Into HTML5
Doris Chen
 

Plus de Doris Chen (20)

Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!
 
OSCON Presentation: Developing High Performance Websites and Modern Apps with...
OSCON Presentation: Developing High Performance Websites and Modern Apps with...OSCON Presentation: Developing High Performance Websites and Modern Apps with...
OSCON Presentation: Developing High Performance Websites and Modern Apps with...
 
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps FasterPractical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
Practical Performance Tips and Tricks to Make Your HTML/JavaScript Apps Faster
 
Developing High Performance Websites and Modern Apps with JavaScript and HTML5
Developing High Performance Websites and Modern Apps with JavaScript and HTML5Developing High Performance Websites and Modern Apps with JavaScript and HTML5
Developing High Performance Websites and Modern Apps with JavaScript and HTML5
 
What Web Developers Need to Know to Develop Native HTML5/JS Apps
What Web Developers Need to Know to Develop Native HTML5/JS AppsWhat Web Developers Need to Know to Develop Native HTML5/JS Apps
What Web Developers Need to Know to Develop Native HTML5/JS Apps
 
Windows 8 Opportunity
Windows 8 OpportunityWindows 8 Opportunity
Windows 8 Opportunity
 
Wins8 appfoforweb fluent
Wins8 appfoforweb fluentWins8 appfoforweb fluent
Wins8 appfoforweb fluent
 
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
 
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 AppsWhat Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
 
Building Beautiful and Interactive Windows 8 apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Windows 8 apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Windows 8 apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Windows 8 apps with JavaScript, HTML5 & CSS3
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
 
Practical HTML5: Using It Today
Practical HTML5: Using It TodayPractical HTML5: Using It Today
Practical HTML5: Using It Today
 
Dive Into HTML5
Dive Into HTML5Dive Into HTML5
Dive Into HTML5
 
Practical HTML5: Using It Today
Practical HTML5: Using It TodayPractical HTML5: Using It Today
Practical HTML5: Using It Today
 
HTML 5 Development for Windows Phone and Desktop
HTML 5 Development for Windows Phone and DesktopHTML 5 Development for Windows Phone and Desktop
HTML 5 Development for Windows Phone and Desktop
 
Dive into HTML5: SVG and Canvas
Dive into HTML5: SVG and CanvasDive into HTML5: SVG and Canvas
Dive into HTML5: SVG and Canvas
 
Performance Optimization and JavaScript Best Practices
Performance Optimization and JavaScript Best PracticesPerformance Optimization and JavaScript Best Practices
Performance Optimization and JavaScript Best Practices
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 

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: 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
  • 4.
  • 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
  • 9. 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>
  • 11. CSS3  IE9  Selectors  Backgrounds and Borders  Fonts (WOFF)  Media Queries  Color  Transformations  Namespaces  Values and Units  IE10 Platform Preview  Multi-column Layout  Grid Layout and CSS3 Flexible Box Layout  Gradients  Transitions and CSS3 3D Transforms
  • 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
  • 17. Demo SVG Basics The element, some styling & interactivity
  • 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
  • 20. Performance Comparison The last piece to help you choose
  • 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
  • 24. Demo • Video, Fallback, Styled Video, Canvas, Animation
  • 25. Frameworks and Tools  Modernizr  www.modernizr.com  Shipping with ASP.NET MVC 3 Tools update
  • 26. Fallback: Polyfills and Shims  Polyfills  github.com/Modernizr/Modernizr/wiki/HTML5-Cross- browser-Polyfills
  • 28. Tools F12 Developer Tools
  • 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
  • 30. Expression Web Super Preview PAGE 32
  • 31. Demo Expression Web Super Preview Test in all major browsers with different version within one view
  • 32. Innovate with Emerging Standards HTML5 Labs
  • 34. Can I Use HTML5 Today? PAGE 36
  • 35. Resources • Started with IE9 and HTML5 • http://bit.ly/hpbwhv • Whitepaper focused for developers • http://msdn.microsoft.com/en-us/ie/ff468705.aspx • Feature-specific demos • http://ie.microsoft.com/testdrive/ • Real-world demos • http://www.beautyoftheweb.com/ • Blogs • http://blogs.msdn.com/b/ie/ • HTML5 Labs • http://html5labs.interoperabilitybridges.com/ PAGE 37
  • 36. Upcoming HTML5 Web Camps 1 Days HTML5 Web Camp June 10, 2011, Colorado Springs, Co June 23, 2011, Irvine, CA http://bit.ly/jo5KFM