SlideShare a Scribd company logo
Denis Platonov




                 1
About me
   2008 – 2011

                              HTML
                  CSS




   Since 2011          JavaScript




                  Front-End


                                     2
Evolution of the web
HTML                      HTML 4.01                                Today
                                             12 years of silence


                                                HTML5




  http://evolutionofweb.appspot.com/?hl=en                                 3
CSS3
Gradients   Border radius   Box shadow   Font face




                                                     4
HTML5 is backwards compatible
 <br>                    valid   HTML5   
 <br />                  valid   HTML5   
 <BR>                    valid   HTML5   
 <BR />                  valid   HTML5   
 <META CHARSET="UTF-8"> valid    HTML5   
 <meta charset=utf-8>    valid   HTML5   
 <meta charset="utf-8"> valid    HTML5   
 <meta charset="utf-8" />valid   HTML5   
 <MeTa CHARset=utF-8>    valid   HTML5   



                                              5
HTML5 – keeping it simple
   <!DOCTYPE html PUBLIC "-//W3C//DTD
    XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtm
    l1-transitional.dtd">
    <html
    xmlns="http://www.w3.org/1999/xhtml"
    dir="ltr" lang="ru" xml:lang="ru">

   <!DOCTYPE html>
    <html lang="ru">



                                            6
Offline data Storage - overview
   Web Storage
     Store key/value pairs locally
     Same-origin restriction
     Each origin gets 5MB of storage space
      ○ QUOTA_EXCEEDED_ERR exception

 Indexed Database API
 Web SQL Database
 File API: Directories and System



                                              7
Offline data Storage - Web Storage

   //Getter
    var foo = localStorage["bar"];

   //Setter
    localStorage["bar"] = foo;

   //Getter for integer
    var foo =
    parseInt(localStorage["bar"]);


                                     8
Offline web applications
   <!DOCTYPE HTML>
    <html manifest="/cache.manifest">
       <body>
       </body>
    </html>




                                        9
Offline web applications
CACHE MANIFEST
# Version 1
CACHE:
/style.css
/javascript.js
NETWORK:
/script.cgi
FALLBACK:
/ /offline.html



                           10
Web workers
 Background JavaScript
 Multiple threads




                          11
Web sockets
 Full-duplex communication channel
 Web Sockets provide an enormous
  reduction in unnecessary network traffic
                    Use case A:          Use case B:
                    1,000 clients        10,000 clients
                    polling every second polling every second

                    Use case C:
                    100,000 clients
                    polling every second




                                                                12
Geolocation
   IP address
   Triangulation:
     Wi-Fi, GSM or GPS
   http://html5demos.com/geo




                                13
<form>
 type="text"
 type="password"
 type="checkbox"
 type="radio"
 select
 type="button"
 type="submit"
 type="file"
 textarea




                    14
<form> - input types
<input type="email">
<input type="url">
<input type="tel">




                       15
<form> - input types


      Default layout   type="email"




      type="url"       type="tel"




                                      16
<form> - input types
   <input type="number" min="0"
    max="10" step="2" value="6">




   <input type="range" min="0"
    max="10" step="2" value="6">




                                   17
<form> - input types
<input   type="date">
<input   type="datetime">
<input   type="datetime-local">
<input   type="month">
<input   type="week">
                            time   datetime-local
<input   type="time">




date         datetime    month        week
                                                    18
<form> - input types
<input type="search">



<input type="color">




                        19
<form> - Placeholder text

<input type="text“
  onblur="if (this.value == '') {this.value
  = 'search this site';}“
  onfocus="if(this.value == 'search this
  site') {this.value = '';}“
  value="search this site">




                                              20
<form> - Placeholder text




<input type="text” placeholder="search this site">




                                                     21
<form> - datalist
<input type="search" list="search-
  suggestions"/>
<datalist id="search-suggestions">
  <option label="DM"
  value="Depeche Mode">
  <option label="Moz"
  value="Morrissey">
  <option label="NO"
  value="New Order">
  <option label="TC"
  value="The Cure">
</datalist>


                                     22
<form> - autofocus




<input type="text" autofocus />


                                  23
<form> - validation

 <input type="email">




 <input type="text" required>




 http://miketaylr.com/pres/html5/forms2.html



                                               24
<canvas> - introduction
 Bitmap
 2D
 JavaScript
 Simple shapes, lines, gradients, text,
  images




                                           25
<canvas> - IE support
    excanvas.js




                        26
<audio>, <video> - markup
<audio controls>
  <source src="music.ogg" type="audio/ogg">
  <source src="music.mp3" type="audio/mpeg">
  
</audio>

<video width="300" height="200" controls>
 <source src="video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
 <source src="video.webm" type='video/webm; codecs="vp8, vorbis"'>
 <source src="video.ogv" type='video/ogg; codecs="theora, vorbis"'>
 

</video>




                                                                              27
<audio>, <video> - browser support
          Browser                   (H.264/AAC)   (VP8/Vorbis)   (Theora/Vorbis)
                                    .MPEG-4       .WebM          .Ogg
             Mozilla Firefox 3.6+                      a                a
<video>




             Opera 10.63+                              a                a
             Google Chrome 8.0+          a             a                a
             Apple Safari 5.0.3+         a
             Microsoft IE9+              a             a

          Browser                   (MP3)         (Vorbis)
                                    .MPEG-4       .Ogg
             Mozilla Firefox 3.6+                      a
<audio>




             Opera 10.63+                              a
             Google Chrome 8.0+          a             a
             Apple Safari 5.0.3+         a
             Microsoft IE9+              a

                                                                                   28
Feature detect
                               Detects support for
                                HTML5 & CSS3 features
                               http://www.modernizr.com/




Do not reinvent the wheel   Use Modernizr!


                                                            29
Yes, You Can Use HTML5
Today!




                         30
Questions & answers?




                       31
32

More Related Content

Viewers also liked

2014 2015 - student handbook
2014   2015 - student  handbook 2014   2015 - student  handbook
2014 2015 - student handbook
Nastasia Arabuli
 
Greece’s debt crisis
Greece’s debt crisisGreece’s debt crisis
Greece’s debt crisis
상은 안상은
 
Alethiology club gmo
Alethiology club gmoAlethiology club gmo
Alethiology club gmo
JTKalina
 
I learningframework
I learningframeworkI learningframework
I learningframework
Lia Yuliana
 
Communication journal name1
Communication journal name1Communication journal name1
Communication journal name1
Alberto Ramirez
 
Chinese Garden Scholar Musings
Chinese Garden Scholar MusingsChinese Garden Scholar Musings
Chinese Garden Scholar Musings
John Jeffery
 

Viewers also liked (7)

2014 2015 - student handbook
2014   2015 - student  handbook 2014   2015 - student  handbook
2014 2015 - student handbook
 
Greece’s debt crisis
Greece’s debt crisisGreece’s debt crisis
Greece’s debt crisis
 
Alethiology club gmo
Alethiology club gmoAlethiology club gmo
Alethiology club gmo
 
I learningframework
I learningframeworkI learningframework
I learningframework
 
Communication journal name1
Communication journal name1Communication journal name1
Communication journal name1
 
Prueba
PruebaPrueba
Prueba
 
Chinese Garden Scholar Musings
Chinese Garden Scholar MusingsChinese Garden Scholar Musings
Chinese Garden Scholar Musings
 

Similar to Html5 and css3

html5 an introduction
html5 an introductionhtml5 an introduction
html5 an introduction
vrt-medialab
 
Repaso rápido a los nuevos estándares web
Repaso rápido a los nuevos estándares webRepaso rápido a los nuevos estándares web
Repaso rápido a los nuevos estándares web
Pablo Garaizar
 
Edge of the Web
Edge of the WebEdge of the Web
Edge of the Web
Todd Anglin
 
Introduccion a HTML5
Introduccion a HTML5Introduccion a HTML5
Introduccion a HTML5
Pablo Garaizar
 
html5
html5html5
Developing web applications in 2010
Developing web applications in 2010Developing web applications in 2010
Developing web applications in 2010
Ignacio Coloma
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
Marcelio Leal
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Sadaaki HIRAI
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
Mandakini Kumari
 
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScriptHTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
Todd Anglin
 
C# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASPC# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASP
Mohammad Shaker
 
Echo HTML5
Echo HTML5Echo HTML5
Echo HTML5
Nathan Smith
 
Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~
Sho Ito
 
Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3
Brian Moon
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
Sadaaki HIRAI
 
Change by HTML5
Change by HTML5Change by HTML5
Change by HTML5
dynamis
 
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
Patrick Lauke
 
The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5
Todd Anglin
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
Kevin DeRudder
 
HTML5 and Beyond
HTML5 and BeyondHTML5 and Beyond
HTML5 and Beyond
dynamis
 

Similar to Html5 and css3 (20)

html5 an introduction
html5 an introductionhtml5 an introduction
html5 an introduction
 
Repaso rápido a los nuevos estándares web
Repaso rápido a los nuevos estándares webRepaso rápido a los nuevos estándares web
Repaso rápido a los nuevos estándares web
 
Edge of the Web
Edge of the WebEdge of the Web
Edge of the Web
 
Introduccion a HTML5
Introduccion a HTML5Introduccion a HTML5
Introduccion a HTML5
 
html5
html5html5
html5
 
Developing web applications in 2010
Developing web applications in 2010Developing web applications in 2010
Developing web applications in 2010
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
 
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScriptHTML5 Bootcamp: Essential HTML, CSS, & JavaScript
HTML5 Bootcamp: Essential HTML, CSS, & JavaScript
 
C# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASPC# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASP
 
Echo HTML5
Echo HTML5Echo HTML5
Echo HTML5
 
Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~
 
Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
 
Change by HTML5
Change by HTML5Change by HTML5
Change by HTML5
 
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
HTML5 (and friends) - History, overview and current status - jsDay Verona 11....
 
The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5
 
What you need to know bout html5
What you need to know bout html5What you need to know bout html5
What you need to know bout html5
 
HTML5 and Beyond
HTML5 and BeyondHTML5 and Beyond
HTML5 and Beyond
 

Recently uploaded

[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
Lidia A.
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 

Recently uploaded (20)

[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 

Html5 and css3

  • 2. About me  2008 – 2011 HTML CSS  Since 2011 JavaScript Front-End 2
  • 3. Evolution of the web HTML HTML 4.01 Today 12 years of silence HTML5 http://evolutionofweb.appspot.com/?hl=en 3
  • 4. CSS3 Gradients Border radius Box shadow Font face 4
  • 5. HTML5 is backwards compatible  <br> valid HTML5   <br /> valid HTML5   <BR> valid HTML5   <BR /> valid HTML5   <META CHARSET="UTF-8"> valid HTML5   <meta charset=utf-8> valid HTML5   <meta charset="utf-8"> valid HTML5   <meta charset="utf-8" />valid HTML5   <MeTa CHARset=utF-8> valid HTML5  5
  • 6. HTML5 – keeping it simple  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm l1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="ru" xml:lang="ru">  <!DOCTYPE html> <html lang="ru"> 6
  • 7. Offline data Storage - overview  Web Storage  Store key/value pairs locally  Same-origin restriction  Each origin gets 5MB of storage space ○ QUOTA_EXCEEDED_ERR exception  Indexed Database API  Web SQL Database  File API: Directories and System 7
  • 8. Offline data Storage - Web Storage  //Getter var foo = localStorage["bar"];  //Setter localStorage["bar"] = foo;  //Getter for integer var foo = parseInt(localStorage["bar"]); 8
  • 9. Offline web applications  <!DOCTYPE HTML> <html manifest="/cache.manifest"> <body> </body> </html> 9
  • 10. Offline web applications CACHE MANIFEST # Version 1 CACHE: /style.css /javascript.js NETWORK: /script.cgi FALLBACK: / /offline.html 10
  • 11. Web workers  Background JavaScript  Multiple threads 11
  • 12. Web sockets  Full-duplex communication channel  Web Sockets provide an enormous reduction in unnecessary network traffic Use case A: Use case B: 1,000 clients 10,000 clients polling every second polling every second Use case C: 100,000 clients polling every second 12
  • 13. Geolocation  IP address  Triangulation:  Wi-Fi, GSM or GPS  http://html5demos.com/geo 13
  • 14. <form>  type="text"  type="password"  type="checkbox"  type="radio"  select  type="button"  type="submit"  type="file"  textarea 14
  • 15. <form> - input types <input type="email"> <input type="url"> <input type="tel"> 15
  • 16. <form> - input types Default layout type="email" type="url" type="tel" 16
  • 17. <form> - input types  <input type="number" min="0" max="10" step="2" value="6">  <input type="range" min="0" max="10" step="2" value="6"> 17
  • 18. <form> - input types <input type="date"> <input type="datetime"> <input type="datetime-local"> <input type="month"> <input type="week"> time datetime-local <input type="time"> date datetime month week 18
  • 19. <form> - input types <input type="search"> <input type="color"> 19
  • 20. <form> - Placeholder text <input type="text“ onblur="if (this.value == '') {this.value = 'search this site';}“ onfocus="if(this.value == 'search this site') {this.value = '';}“ value="search this site"> 20
  • 21. <form> - Placeholder text <input type="text” placeholder="search this site"> 21
  • 22. <form> - datalist <input type="search" list="search- suggestions"/> <datalist id="search-suggestions"> <option label="DM" value="Depeche Mode"> <option label="Moz" value="Morrissey"> <option label="NO" value="New Order"> <option label="TC" value="The Cure"> </datalist> 22
  • 23. <form> - autofocus <input type="text" autofocus /> 23
  • 24. <form> - validation <input type="email"> <input type="text" required> http://miketaylr.com/pres/html5/forms2.html 24
  • 25. <canvas> - introduction  Bitmap  2D  JavaScript  Simple shapes, lines, gradients, text, images 25
  • 26. <canvas> - IE support excanvas.js 26
  • 27. <audio>, <video> - markup <audio controls> <source src="music.ogg" type="audio/ogg"> <source src="music.mp3" type="audio/mpeg"> <!-- Flash fallback (flowplayer.org) --> </audio> <video width="300" height="200" controls> <source src="video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> <source src="video.webm" type='video/webm; codecs="vp8, vorbis"'> <source src="video.ogv" type='video/ogg; codecs="theora, vorbis"'> <!-- Flash fallback (flowplayer.org) --> </video> 27
  • 28. <audio>, <video> - browser support Browser (H.264/AAC) (VP8/Vorbis) (Theora/Vorbis) .MPEG-4 .WebM .Ogg Mozilla Firefox 3.6+ a a <video> Opera 10.63+ a a Google Chrome 8.0+ a a a Apple Safari 5.0.3+ a Microsoft IE9+ a a Browser (MP3) (Vorbis) .MPEG-4 .Ogg Mozilla Firefox 3.6+ a <audio> Opera 10.63+ a Google Chrome 8.0+ a a Apple Safari 5.0.3+ a Microsoft IE9+ a 28
  • 29. Feature detect  Detects support for HTML5 & CSS3 features  http://www.modernizr.com/ Do not reinvent the wheel Use Modernizr! 29
  • 30. Yes, You Can Use HTML5 Today! 30
  • 32. 32