SlideShare a Scribd company logo
NovikovEugeny29.10.10HTML5 review
Rough Timeline of Web Technologies1991   HTML1994   HTML 21996   CSS1 + JavaScript1997   HTML 41998   CSS 22000   XHTML 12002   Tableless Web Design2005   AJAX2009   HTML 5
What is HTML5 ?HTML5 ~=HTML + CSS + JS APIs
New simple doctype<!DOCTYPE html>
New semantic tags<body><header>    <hgroup>      <h1>Page title</h1>      <h2>Page subtitle</h2>    </hgroup>   </header> <nav>     <ul> Navigation... </ul>  </nav>   <section>    <article>       <header>         <h1>Title</h1>       </header>       <section>         Content...       </section>     </article>     <article>      <header>       <h1>Title</h1>      </header>      <section>          Content...     </section>   </article>   <article>      <header>        <h1>Title</h1>      </header>      <section>          Content...      </section>   </article></section><aside>      Top links... </aside><footer>     Copyright © 2010.   </footer> </body>
Div vs New tags
New link relations<link rel="alternate" type="application/rss+xml" href="http://myblog.com/feed" /> <link rel="icon" href="/favicon.ico" /> <link rel="pingback" href="http://myblog.com/xmlrpc.php"> <link rel="prefetch"href="http://myblog.com/main.php"> ...<a rel="archives" href="http://myblog.com/archives">old posts</a> <a rel="external" href="http://notmysite.com">tutorial</a> <a rel="license" href="http://www.apache.org/licenses/LICENSE-2.0">license</a> <a rel="nofollow" href="http://notmysite.com/sample">wannabe</a> <a rel="tag" href="http://myblog.com/category/games">games posts</a>http://www.blog.whatwg.org/the-road-to-html-5-link-relations#what
ARIA attributes<ul id="tree1" role="tree" tabindex="0«aria-labelledby="label_1"><lirole="treeitem" tabindex="-1" aria-expanded="true">Fruits</li> <lirole="group"> <ul> <lirole="treeitem" tabindex="-1">Oranges</li> <lirole="treeitem" tabindex="-1">Pineapples</li>... </ul> </li> </ul>
New form field types
Audio + Video<audio id="audio" src="djtapolskii.mp3" controls></audio>;<video id="video" src="10 минут для пресса.avi" autoplay controls></video>
Canvas<canvas id="canvas" width="838" height="220"></canvas> <script>varcanvasContext = document.getElementById("canvas").getContext("2d");canvasContext.fillRect(250, 25, 150, 100);canvasContext.beginPath();	canvasContext.arc(450, 110, 100, Math.PI * 1/2, Math.PI * 3/2); canvasContext.lineWidth = 15; canvasContext.lineCap = 'round'; canvasContext.strokeStyle = 'rgba(255, 127, 0, 0.5)'; canvasContext.stroke(); </script>
New in HTMLSemantics (New tags, Link Relations)
Accessibility (ARIA roles)
Web Forms 2.0 (Input Fields)
Multimedia (Audio Tag, Video Tag)
2D drawing (Canvas)JS APIs
New SelectorsFinding elements by class (DOM API)var el = document.getElementById('section1'); el.focus(); varels = document.getElementsByTagName('div');els[0].focus();varels = document.getElementsByClassName('section'); els[0].focus();Finding elements by CSS syntax (Selectors API)varels = document.querySelectorAll("ulli:nth-child(odd)");varels = document.querySelectorAll("table.test > tr > td");
Web Storage// use localStorage for persistent storage // use sessionStorage for per tab storage textarea.addEventListener('keyup', function () { window.localStorage['value'] = area.value; window.localStorage['timestamp'] = (new Date()).getTime(); }, false); textarea.value = window.localStorage['value'];                                                  Save text value on the client side
Web SQL DatabaseVar db = window.openDatabase(“Database Name”, “Database Version”);db.transaction(function(tx){tx.executeSql(“SELECT * FROM test”, [], successCallback, errorCallback);});If you try to open a database that doesn’t exist, the API will create it on the fly for you. You also don’t have to worry about closing databases. http://html5doctor.com/introducing-web-sql-databases/
Application Cache<html manifest = “cache.manifest”>Window.applicationCache.addEventListener( ‘checking’ ,updateCacheStatus, false);CACHE MANIFEST# version 1CACHE:/html5/src/refresh.png/html5/src/logic.js/html5/src/style.css/html5/src/background.png
Web Workersmain.js: var worker = new Worker('extra_work.js');worker.onmessage = function(event) { alert(event.data);  };extra_work.js: self.onmessage= function(event) { 		// Do some work. self.postMessage(some_data);	}
Web Socketsvar socket = new WebSocket(location); socket.onopen = function(event) {socket.postMessage(“Hello, WebSocket”); } socket.onmessage = function(event) { alert(event.data); } socket.onclose = function(event) { alert(“closed”); } Bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket, designed to be implemented in webbrowsers and web servers.
Notificationsif (window.webkitNotifications.checkPermission() == 0) { // you can pass any url as a parameter window.webkitNotifications.createNotification(tweet.picture, tweet.title, tweet.text).show(); } else {window.webkitNotifications.requestPermission();} http://playground.html5rocks.com/#simple_notifications
Drag and dropdocument.addEventListener('dragstart', function(event) { event.dataTransfer.setData('text', 'Customized text'); event.dataTransfer.effectAllowed= 'copy'; }, false);http://playground.html5rocks.com/#drag_from_desktop
Geolocationif (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var lat = position.coords.latitude; varlng = position.coords.longitude; var options = { position: new google.maps.LatLng(lat, lng) } var marker = new google.maps.Marker(options); marker.setMap(map); 	});}
New in JS APIsClient Side Storage (Web SQL Database, App Cache, Web Strorage)

More Related Content

KEY
HTML5 - techMaine Presentation 5/18/09
PPT
HTML5 Overview
ODP
Developing and testing ajax components
PPT
Html5 Overview
PPT
Worry Free Web Development
PPT
Fast Loading JavaScript
KEY
Plone Interactivity
PPT
Grails and Dojo
HTML5 - techMaine Presentation 5/18/09
HTML5 Overview
Developing and testing ajax components
Html5 Overview
Worry Free Web Development
Fast Loading JavaScript
Plone Interactivity
Grails and Dojo

What's hot (20)

PDF
Challenges of building a search engine like web rendering service
PDF
Introducing YUI
PDF
Web Performance & Search Engines - A look beyond rankings
PDF
Microformats HTML to API
PDF
#3 HTML & CSS [know-how]
PDF
Shifting Gears
PPT
New Browsers
ZIP
Looking into HTML5
PPT
Developing PHP Web Applications with the Raxan Framework
KEY
Intro to html5 Boilerplate
PDF
Findability Bliss Through Web Standards
PDF
Web Standards: Fueling Innovation [Web Design World Boston '08]
PPTX
Everything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick Stox
PDF
REST, the internet as a database?
PPT
Html 5 introduction
PPTX
Web design 2 - Basic HTML 2010
PDF
Front End on Rails
PPTX
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
PDF
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Challenges of building a search engine like web rendering service
Introducing YUI
Web Performance & Search Engines - A look beyond rankings
Microformats HTML to API
#3 HTML & CSS [know-how]
Shifting Gears
New Browsers
Looking into HTML5
Developing PHP Web Applications with the Raxan Framework
Intro to html5 Boilerplate
Findability Bliss Through Web Standards
Web Standards: Fueling Innovation [Web Design World Boston '08]
Everything That Can Go Wrong Will Go Wrong - Tech SEO Boost 2017 - Patrick Stox
REST, the internet as a database?
Html 5 introduction
Web design 2 - Basic HTML 2010
Front End on Rails
SMX Advanced 2018 SEO for Javascript Frameworks by Patrick Stox
Essential Javascript -- A Javascript &lt;b>Tutorial&lt;/b>
Ad

Viewers also liked (8)

PPTX
プレゼン
PPT
Sonar quality
PPTX
Presentation1
PPTX
Sse co creating value-5a_2011
PPTX
Sse strategy dice_2011
PPTX
Azure for ug
PPSX
Chemistry at the University of Leicester
PPT
Chemistry applicants - the process
プレゼン
Sonar quality
Presentation1
Sse co creating value-5a_2011
Sse strategy dice_2011
Azure for ug
Chemistry at the University of Leicester
Chemistry applicants - the process
Ad

Similar to Html5 (20)

PPT
Is it time to start using HTML 5
PDF
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
PDF
HTML5 & Friends
PPTX
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
PPTX
HTML5 - Pedro Rosa
PPTX
HTML5 introduction for beginners
PPTX
PDF
HTML5 and friends - Institutional Web Management Workshop 2010
KEY
Html5 Brown Bag
PPTX
HTML5: The Next Internet Goldrush
PPT
Html5 basics
PPTX
Html5 & less css
PDF
KEY
2022 HTML5: The future is now
PPT
Html5(2)
PPT
Html5(2)
PPTX
HTML5 & CSS3
PPT
HTML5: An Introduction To Next Generation Web Development
PDF
HTML5 - An introduction
PDF
HTML5: Introduction
Is it time to start using HTML 5
HTML5 kickstart - Brooklyn Beta workshop 21.10.2010
HTML5 & Friends
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
HTML5 - Pedro Rosa
HTML5 introduction for beginners
HTML5 and friends - Institutional Web Management Workshop 2010
Html5 Brown Bag
HTML5: The Next Internet Goldrush
Html5 basics
Html5 & less css
2022 HTML5: The future is now
Html5(2)
Html5(2)
HTML5 & CSS3
HTML5: An Introduction To Next Generation Web Development
HTML5 - An introduction
HTML5: Introduction

More from dotNETUserGroupDnipro (9)

PPTX
Mercurial presentation
PPT
Ef code first
PPTX
PPTX
PPTX
Soft serve prism
PPT
Erp microsoft dynamics
PPTX
Css 3 overview
PPTX
Mercurial presentation
Ef code first
Soft serve prism
Erp microsoft dynamics
Css 3 overview

Html5

  • 2. Rough Timeline of Web Technologies1991 HTML1994 HTML 21996 CSS1 + JavaScript1997 HTML 41998 CSS 22000 XHTML 12002 Tableless Web Design2005 AJAX2009 HTML 5
  • 3. What is HTML5 ?HTML5 ~=HTML + CSS + JS APIs
  • 5. New semantic tags<body><header> <hgroup> <h1>Page title</h1> <h2>Page subtitle</h2> </hgroup> </header> <nav> <ul> Navigation... </ul> </nav> <section> <article> <header> <h1>Title</h1> </header> <section> Content... </section> </article> <article> <header> <h1>Title</h1> </header> <section> Content... </section> </article> <article> <header> <h1>Title</h1> </header> <section> Content... </section> </article></section><aside> Top links... </aside><footer> Copyright © 2010. </footer> </body>
  • 7. New link relations<link rel="alternate" type="application/rss+xml" href="http://myblog.com/feed" /> <link rel="icon" href="/favicon.ico" /> <link rel="pingback" href="http://myblog.com/xmlrpc.php"> <link rel="prefetch"href="http://myblog.com/main.php"> ...<a rel="archives" href="http://myblog.com/archives">old posts</a> <a rel="external" href="http://notmysite.com">tutorial</a> <a rel="license" href="http://www.apache.org/licenses/LICENSE-2.0">license</a> <a rel="nofollow" href="http://notmysite.com/sample">wannabe</a> <a rel="tag" href="http://myblog.com/category/games">games posts</a>http://www.blog.whatwg.org/the-road-to-html-5-link-relations#what
  • 8. ARIA attributes<ul id="tree1" role="tree" tabindex="0«aria-labelledby="label_1"><lirole="treeitem" tabindex="-1" aria-expanded="true">Fruits</li> <lirole="group"> <ul> <lirole="treeitem" tabindex="-1">Oranges</li> <lirole="treeitem" tabindex="-1">Pineapples</li>... </ul> </li> </ul>
  • 10. Audio + Video<audio id="audio" src="djtapolskii.mp3" controls></audio>;<video id="video" src="10 минут для пресса.avi" autoplay controls></video>
  • 11. Canvas<canvas id="canvas" width="838" height="220"></canvas> <script>varcanvasContext = document.getElementById("canvas").getContext("2d");canvasContext.fillRect(250, 25, 150, 100);canvasContext.beginPath(); canvasContext.arc(450, 110, 100, Math.PI * 1/2, Math.PI * 3/2); canvasContext.lineWidth = 15; canvasContext.lineCap = 'round'; canvasContext.strokeStyle = 'rgba(255, 127, 0, 0.5)'; canvasContext.stroke(); </script>
  • 12. New in HTMLSemantics (New tags, Link Relations)
  • 14. Web Forms 2.0 (Input Fields)
  • 17. New SelectorsFinding elements by class (DOM API)var el = document.getElementById('section1'); el.focus(); varels = document.getElementsByTagName('div');els[0].focus();varels = document.getElementsByClassName('section'); els[0].focus();Finding elements by CSS syntax (Selectors API)varels = document.querySelectorAll("ulli:nth-child(odd)");varels = document.querySelectorAll("table.test > tr > td");
  • 18. Web Storage// use localStorage for persistent storage // use sessionStorage for per tab storage textarea.addEventListener('keyup', function () { window.localStorage['value'] = area.value; window.localStorage['timestamp'] = (new Date()).getTime(); }, false); textarea.value = window.localStorage['value']; Save text value on the client side
  • 19. Web SQL DatabaseVar db = window.openDatabase(“Database Name”, “Database Version”);db.transaction(function(tx){tx.executeSql(“SELECT * FROM test”, [], successCallback, errorCallback);});If you try to open a database that doesn’t exist, the API will create it on the fly for you. You also don’t have to worry about closing databases. http://html5doctor.com/introducing-web-sql-databases/
  • 20. Application Cache<html manifest = “cache.manifest”>Window.applicationCache.addEventListener( ‘checking’ ,updateCacheStatus, false);CACHE MANIFEST# version 1CACHE:/html5/src/refresh.png/html5/src/logic.js/html5/src/style.css/html5/src/background.png
  • 21. Web Workersmain.js: var worker = new Worker('extra_work.js');worker.onmessage = function(event) { alert(event.data); };extra_work.js: self.onmessage= function(event) { // Do some work. self.postMessage(some_data); }
  • 22. Web Socketsvar socket = new WebSocket(location); socket.onopen = function(event) {socket.postMessage(“Hello, WebSocket”); } socket.onmessage = function(event) { alert(event.data); } socket.onclose = function(event) { alert(“closed”); } Bi-directional, full-duplex communications channels, over a single Transmission Control Protocol (TCP) socket, designed to be implemented in webbrowsers and web servers.
  • 23. Notificationsif (window.webkitNotifications.checkPermission() == 0) { // you can pass any url as a parameter window.webkitNotifications.createNotification(tweet.picture, tweet.title, tweet.text).show(); } else {window.webkitNotifications.requestPermission();} http://playground.html5rocks.com/#simple_notifications
  • 24. Drag and dropdocument.addEventListener('dragstart', function(event) { event.dataTransfer.setData('text', 'Customized text'); event.dataTransfer.effectAllowed= 'copy'; }, false);http://playground.html5rocks.com/#drag_from_desktop
  • 25. Geolocationif (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var lat = position.coords.latitude; varlng = position.coords.longitude; var options = { position: new google.maps.LatLng(lat, lng) } var marker = new google.maps.Marker(options); marker.setMap(map); });}
  • 26. New in JS APIsClient Side Storage (Web SQL Database, App Cache, Web Strorage)
  • 30. <html>5doctor<!--[if lte IE 8]><script src="html5.js" type="text/javascript"></script><![endif]--> <style> time { font-style: italic; }; figure { border: 4px inset #AAA; padding: 4px }hgroup { color: red;}…<time datetime="2009-09-13">my birthday</time><br><figure> <imgsrc="myPhoto.jpg“ /></figure><br><hgroup> Hello World!</hgroup> http://remysharp.com/downloads/html5.js
  • 31. Europe Headquarters52 V. Velykoho Str.Lviv 79053, UkraineTel: +380-32-240-9090Fax: +380-32-240-9080E-mail: info@softserveinc.comWebsite: www.softserveinc.comUS Headquarters12800 University Drive, Suite 250Fort Myers, FL 33907, USATel: 239-690-3111 Fax: 239-690-3116Thank You!Copyright ©2010 SoftServe, Inc.Contacts