HTML5 & IE

37
Microsoft | Open Door Who I am Emad Al Ashi ي ش ع لداا م عTechnical Team Leader – eSense Software Jordev Lead MVP 2011 ASP.NET/IIS www. EmadAshi .com www. DotNetArabi .com @EmadAshi

description

Main features of HTML5 supported by IE9, how Microsoft approaches HTML5, and how to work on HTML5 before it's finalized by W3C

Transcript of HTML5 & IE

Page 1: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Who I am

• Emad Al Ashi العشي عماد• Technical Team Leader – eSense Software• Jordev Lead• MVP 2011 ASP.NET/IIS

• www.EmadAshi.com

• www.DotNetArabi.com

• @EmadAshi

Page 2: HTML5 & IE

M i c r o s o f t | O p e n D o o r

DotNetArabi

Page 3: HTML5 & IE

M i c r o s o f t | O p e n D o o r

HTML5 & IE

By Emad Alashi

HTML5 & IE

Page 4: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Agenda

• What is HTML5• HTML5 general features in IE9• HTML5 IE10• Working with HTML5

Page 5: HTML5 & IE

M i c r o s o f t | O p e n D o o r

W3C

WHATWGWeb Hypertext Application Technology Working Group

World Wide Web Consortium

What is HTML5?

Page 6: HTML5 & IE

M i c r o s o f t | O p e n D o o r

HTML

CSS3

JS

SVG

What is HTML5?

Page 7: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Platform Independent

Standards

Rich User Experience

Less Bandwidth

Semantically Connected Content

The Next Web

Device Independent

What does HTML5 bring?

Page 8: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Candidate Recommendation 2012

W3C Recommendation 2022

What is HTML5

Page 9: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Site-ready HTML5 IE9

CTP’s IE10

Test Cases to W3C

HTML5 Lab

Microsoft’s Approach for HTML5 (IE)

Page 10: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Microsoft’s Approach for HTML5 (Tools)

Visual Studio 2010 SP1:

• HTML5 document type validation• IntilleSense

• HTML5 elements and tags• JavaScript API’s• CSS3

• ASP.NET MVC 3 Tool Update: Modernizr

Page 11: HTML5 & IE

M i c r o s o f t | O p e n D o o r

HTML5 on IE9

Page 12: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Semantic Web

<header>

<nav> <section>

<article> <article>

<footer>

HTML5 on IE9

Page 13: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Video & AudioHTML5 on IE9

• Video codec's• H.264• MPEG 4

• Audio codec's• MP3• AAC

Page 14: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Demo

Video & AudioHTML5 on IE9

Page 15: HTML5 & IE

M i c r o s o f t | O p e n D o o r

• Scalable Vector Graphics• vector-based• XML format• DOM and CSS• Open Standard

SVGHTML5 on IE9

Page 16: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Demo

SVGHTML5 on IE9

Page 17: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Canvas

<canvas id="myCanvas" width="400" height="200" >Your browser does not support the canvas element.</canvas>

<script type="text/javascript">var c = document.getElementById("myCanvas");var cxt = c.getContext("2d");cxt.fillStyle = "#FF0000";cxt.fillRect(0,0,150,75);</script>

HTML5 on IE9

Page 18: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Canvas

Demo1

Demo2

HTML5 on IE9

Page 19: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Geolocation

Microsoft Location Service

HTML5 on IE9

Page 20: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Geolocationnavigator.geolocation.getCurrentPosition(foundIt, failed);

Function foundIt(pos){

pos.coords.latitude;pos.coords.longitude;

}

Function failed(){

alert(‘Hahahaaaawz!’);}

HTML5 on IE9

Page 21: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Geolocation

Demo

HTML5 on IE9

Page 22: HTML5 & IE

M i c r o s o f t | O p e n D o o r

• Key-value pairs• String type (Serialization)• Local:

• Cross windows• Closed windows

• Session:• Per--window• Window life time

Web StorageHTML5 on IE9

Page 23: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Web Storage

localStorage.getItem(‘key’)localStorage.setItem(‘key’)

sessionStorage.getItem(‘key’)sessionStorage.setItem(‘key’)

HTML5 on IE9

Page 24: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Web Storage

Demo

HTML5 on IE9

Page 25: HTML5 & IE

M i c r o s o f t | O p e n D o o r

• width• height• orientation• resolution• …

CSS3 MediaQuery@media screen and (min-width: 400px) and (max-width: 800px) { … }

HTML5 on IE9

Page 26: HTML5 & IE

M i c r o s o f t | O p e n D o o r

CSS3 MediaQuery

Demo

HTML5 on IE9

Page 27: HTML5 & IE

M i c r o s o f t | O p e n D o o r

HTML5

<!DOCTYPE html>

HTML5 on IE9

Page 28: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Graphic AcceleratorHTML5 on IE9

Page 29: HTML5 & IE

M i c r o s o f t | O p e n D o o r

• Compiled• Type Optimizations• Fast Interpreter• Library Optimizations

JavaScript EngineChakra

HTML5 on IE9

Page 30: HTML5 & IE

M i c r o s o f t | O p e n D o o r

What’s cooking? IE10

Page 31: HTML5 & IE

M i c r o s o f t | O p e n D o o r

IE10HTML5 on IE10

• Forms• Input types• Form elements• Form attributes

• Web Workers• File API• Web Socekts• IndexedDB• …

Page 32: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Working with HTML5

Page 33: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Working with HTML5

• User Agent sniffing• Manual Feature Detection

• !!document.createElement('canvas').getContext

• Modernizr:

Modernizr.load({ test: Modernizr.geolocation, yep : 'geo.js', nope: 'geo-polyfill.js' });

Page 34: HTML5 & IE

M i c r o s o f t | O p e n D o o r

How to decide

• Your needs• The environment• Feature spread among browsers• How to polyfill

Page 35: HTML5 & IE

M i c r o s o f t | O p e n D o o r

Interesting sites

• beautyoftheweb.com• caniuse.com• ietestdrive.com• html5labs.com• html5demos.com• html5rocks.com• html5readiness.com

• Internet Explorer 10 Guide for Developers

Page 37: HTML5 & IE

M i c r o s o f t | O p e n D o o r

HTML5 and IE

Thank You

Q & A

www.EmadAshi.comwww.DotNetArabi.com

@Emadashi