SlideShare a Scribd company logo
HTML5: Next Generation Web Development




                         Tilak Joshi
                         Senior Web Architect
                         NASA Goddard Space Flight Center (Contractor)
                         August 17th 2011
What is HTML5?
“HTML5 is a language for structuring and presenting content for the World Wide Web, a core technology of the Internet. It is the fifth
 revision of the HTML standard (originally created in 1990 and most recently standardized as HTML4 in 1997[1]) and as of August 2011[update]
 is still under development. Its core aims have been to improve the language with support for the latest multimedia while keeping it easily
 readable by humans and consistently understood by computers and devices (web browsers, parsers etc.). HTML5 is intended to subsume
 not only HTML4, but XHTML1 and DOM2HTML (particularly JavaScript) as well.[1]” – Wikipedia
What is HTML5?
HTML5 is the up and coming standard for next generation web development. It reduces focus on syntax and
increases focus on features. It was created by developers and browsers to facilitate web programming and increase
focus on more dynamic content.

Included Features
• New Elements ( <article>,<section>,<aside>,<nav>, etc.)
• Native Audio/Video Support
• Drawing APIs (Canvas, SVG, MathML, WebGL)
• Geolocation
• Drag and Drop
• Web Forms 2.0
• Microdata
• Local Storage
• Web Sockets
• Web Workers

Fun Facts
• HTML5 is the brainchild of WHATWG and was adopted by the W3C after much hesitation
• Apple’s ongoing battle with Adobe was sparked by Apple choosing to support HTML5 over Flash
• Contrary to popular belief, almost all current browsers provide support for most HTML5 features
                                                                                                    Official HTML5 Logo
New Elements in HTML5
All new tags maintain the same style and element properties as <div> but have special meaning and possibly
special interpretations by markup readers (crawlers) or browsers. When declaring these tags, in order to maintain
backwards compatibility, style them as display:block in your stylesheet or internal style.

These are most of the more important tags:

• <article> – external content (news articles, blogs, etc)
• <section> – sections of the web page (can contain multiple <article> tags)
• <aside> - content related to, but not part of, the primary content
• <nav>,<menu> - the primary navigation, any subnavigation
• <header> - section before body, at the beginning of the page
• <footer> - section after body, at the end of the page
• <hgroup> - a group of headers (<h1> to <h6> tags)
• <time> - a date or time
• <figure>,<figcaption> - a figure and a caption describing it (could be a video or image)
Native Audio/Video Support
Current versions of browsers support audio/video, basic controls, a poster for video, duration hint, and more. They
allow VP8, H.264, and OGG formats depending on browser, and allow you to specify a codec in the declaration.

Code (Video):
<video id="video1" width="480" height="260" poster=”firstframe.jpg" durationHint=”59" >
      <source type="video/webm" src=“vid.webm" />
      <source src=“vid.mp4"/>
      <source src=“vid.ogv" />
      <p>Error: video not supported</p>
</video>


Code (Audio):
<audio src="song.ogg" controls="controls">
      Your browser does not support the audio element.
</audio>


Supported Formats (video; audio):
Mozilla Firefox – OGG, VP8; OGG, WAV
Internet Explorer – H.264 natively, OGG and VP8 with manual install; MP3 WAV
Google Chrome – OGG, H.264 (to be discontinued), VP8; OGG, WAV
Apple Safari – H.264 natively, OGG and VP8 with manual install; MP3, WAV
Opera – OGG, VP8; OGG, WAV
Drawing API
HTML5 supports many different APIs for drawing, eliminating the need for Flash, SilverLight, or other third-party
tools. Currently supported APIs include Canvas and SVG. Partially supported APIs include MathML and WebGL.

Canvas:
HTML
<canvas id=”canvas1" width=”600" height="200"> </canvas>

JavaScript
window.onload = function(){
      var canvas = document.getElementById("myCanvas");
      var context = canvas.getContext("2d");
      context.moveTo(100, 150);
      context.lineTo(450, 50);
      context.lineWidth = 10;
      context.strokeStyle = "#ff0000"; // line color
      context.stroke();
};



SVG:
HTML
<svg id=”svg1” xmlns="http://www.w3.org/2000/svg">
       <circle id=”circle1" cx="50" cy="50" r="50" fill="red" />
</svg>
Geolocation
Geolocation provides the user’s location. This is the closest position the User Agent can obtain, which in the case of a GPS
enabled device is exact, and in the case of non-GPS enabled device is the location from the IP address, closest cell phone
tower, or wireless network connection.

Code:
function get_location() {
      navigator.geolocation.getCurrentPosition( handlePosition );
}

function handlePosition(position){
      var longitude = position.coords.longitude;
      var latitude = position.coords.latitude;

        // use this info
}

Properties:
coords.latitude – decimal degrees
coords.longitude – decimal degrees
coords.altitude - meters
coords.accuracy - meters
coords.speed – meters/second
coords.altitudeAccuracy - meters
coords.heading – degrees clockwise from true north
timestamp – Date() Object

Warning:
User has to allow the browser to share their location. It is good practice to not to depend on this data.
Drag and Drop
Drag and Drop is natively allowed by overriding the default browser event of objects snapping back in place.

Code:
HTML
<div id=‘drag1’ draggable=‘true’>I’m Drag1</div>
<div id=‘drag2’ draggable=‘true’>I’m Drag2</div>
<div id=‘dropArea’ ></div>

JavaScript
function allowDrop(e){
      if(e.preventDefault){
            e.preventDefault();
      }
      return false;
}
var dropArea = document.getElementById(‘dropArea’);
dropArea.ondragenter = allowDrop;
dropArea.ondragover = allowDrop;


New Events:
ondragstart – when the draggable item begins to get dragged
ondragenter – when the draggable item enters the droppable area
ondragover – when the draggable item is in the droppable area
ondrop – when the draggable item is dropped
Web Forms 2.0
HTML5 has taken the more common recent input fields and officially standardized them. It provides browser built-
in GUI and basic validation as required.

New Input Types:
email – current validation checks for ‘@’ sign and ‘.’
url – current validation checks for ‘.’
number – provides up and down arrows on the gui, and validates for a number
range – provides a slider on the gui, and validates for a number
date (date, month, week, time, datetime, datetime-local) – shows a picker
search – currently behaves like a regular ‘text’ field
color – provides a color picker on the gui


New Input Type Attributes:
min – min for the number (works for number and range types)
max – max for the number (works for number and range types)
step – step increment for the number (works for number and range types)


Notes:
Support is currently limited, but coming soon. It is encouraged to use it with shims and polyfills as support comes soon. There will be
variation in the GUI and validation as each browser can handle the look and feel of the additional displayed features and the exact
validation.
Additional Features
Microdata, Local Storage, and Web Workers are some of the additional features available in HTML5.

Microdata:
Specifies additional markup language, as per the specified namespace, to identify reviews, recipes, authors, businesses, products, and other
information. This is most useful for screen readers like Google’s crawler to read and identify your content more accurately.


Local Storage:
Information can be stored in the browser without using cookies. This is less overhead and easy access to a lot of data in JSON format but it
is not safe for secure data.


Web Workers:
This is a method for running javascript concurrently and making use of multiple processor CPUs.


Additional Features:
WebSockets, native JSON functions, Cross Domain Requests using AJAX
Backwards Compatibility
Polyfills or polyfiller or shim, is a piece of code (or plugin) that provides the technology that you, the developer, expect the
browser to provide natively. Flattening the API landscape if you will. They can use third party technologies like Flash, SilverLight,
or JavaScript and JQuery libraries.

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


WebShims:
WebShims is a JavaScript library built on JQuery that provides polyfills for the most commonly used HTML5 features.
$.webshims.setOptions('canvas', { type: 'flashpro' //excanvas | flash | flashpro });



Notes:
There are polyfills available for every feature that I have covered and many more. These polyfills support browsers starting from IE6+,
Firefox 3+ and more. This is a quick and easy method that increases browser compatibility until all browsers have full support for HTML5.
Future versions of Modernizr 2.0 will have WebShims built in.
508 Compliance
HTML5 does not hinder 508 compliance as everything that is visual does not apply, and everything that is not has
similar fallbacks as HTML4 or XHTML (i.e. title tags, labels for inputs). The more descriptive tags and microdata
allow a possibility for many 508 enhancements in the future.



•All new elements available in HTML5 are the equivalent of HTML divs and can handle the ‘title’ attribute

• The media-rich enhancements are just that, ‘enhancements.’ There should be text counterparts for functionality

• Microdata offers better compliance options in the future

• Better tag structure offers more options for future screen readers for compliance
Extras: CSS3 Additions
New attributes:
•   border-image
•   border-radius
•   @font-family
•   box-shadow
•   text-shadow


Browser specific attributes:
• -moz (Mozilla Browsers)
• -o (Mozilla Browsers)
• -webkit (Mozilla Browsers)
Questions?

More Related Content

PDF
HTML5: An Introduction To Next Generation Web Development
ODP
Html5
PPTX
Html5 Overview
PDF
HTML5 and CSS3: does now really mean now?
PDF
Html5 CSS3 jQuery Basic
PDF
Wordcamp Thessaloniki 2011 The Nextweb
PDF
Echo HTML5
PPTX
Introduction to html5
HTML5: An Introduction To Next Generation Web Development
Html5
Html5 Overview
HTML5 and CSS3: does now really mean now?
Html5 CSS3 jQuery Basic
Wordcamp Thessaloniki 2011 The Nextweb
Echo HTML5
Introduction to html5

What's hot (20)

PDF
Word camp nextweb
PDF
Building Real-World Dojo Web Applications
PDF
JavaONE 2012 Using Java with HTML5 and CSS3
PDF
jQuery: The World's Most Popular JavaScript Library Comes to XPages
PDF
Using Web Standards to create Interactive Data Visualizations for the Web
PPTX
Edge of the Web
PPTX
Html5 more than just html5 v final
PDF
Dynamic User Interfaces for Desktop and Mobile
PDF
Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011
PPT
Dojo - from web page to web apps
PDF
Web Components v1
PDF
jQuery Comes to XPages
PDF
Rich internet application development using the dojo toolkit
PDF
Great Responsive-ability Web Design
PPT
Google Dev Day2007
PDF
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
PDF
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
PPTX
Getting Started with HTML5 in Tech Com (STC 2012)
PPTX
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
PDF
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
Word camp nextweb
Building Real-World Dojo Web Applications
JavaONE 2012 Using Java with HTML5 and CSS3
jQuery: The World's Most Popular JavaScript Library Comes to XPages
Using Web Standards to create Interactive Data Visualizations for the Web
Edge of the Web
Html5 more than just html5 v final
Dynamic User Interfaces for Desktop and Mobile
Brave new world of HTML5 - Interlink Conference Vancouver 04.06.2011
Dojo - from web page to web apps
Web Components v1
jQuery Comes to XPages
Rich internet application development using the dojo toolkit
Great Responsive-ability Web Design
Google Dev Day2007
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
Getting Started with HTML5 in Tech Com (STC 2012)
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
Ad

Similar to HTML5: An Introduction To Next Generation Web Development (20)

PDF
Building a Better Web with HTML5 and CSS3
PPT
Html5 Future of WEB
PPTX
HTML5 introduction for beginners
PPTX
PPT
HTML5 Presentation
PPT
Html5(2)
PPT
Html5(2)
PDF
Jsf2 html5-jazoon
PDF
HTML5 Refresher
PPTX
Html 5
PPTX
Html5 tutorial for beginners
PDF
HTML5 & CSS3 refresher for mobile apps
PDF
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
PDF
HTML5 and CSS3 refresher
KEY
Everything you need to know about HTML5 in 15 min
ODP
Html5
PPT
HTML5 Webinar - Mind Storm Software
PPTX
HTML5-Tutorial-For-Beginn.6202488.pptx
ODP
Html5
PPTX
HTML5: An Overview
Building a Better Web with HTML5 and CSS3
Html5 Future of WEB
HTML5 introduction for beginners
HTML5 Presentation
Html5(2)
Html5(2)
Jsf2 html5-jazoon
HTML5 Refresher
Html 5
Html5 tutorial for beginners
HTML5 & CSS3 refresher for mobile apps
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
HTML5 and CSS3 refresher
Everything you need to know about HTML5 in 15 min
Html5
HTML5 Webinar - Mind Storm Software
HTML5-Tutorial-For-Beginn.6202488.pptx
Html5
HTML5: An Overview
Ad

Recently uploaded (20)

PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Modernizing your data center with Dell and AMD
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
Teaching material agriculture food technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
Understanding_Digital_Forensics_Presentation.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Review of recent advances in non-invasive hemoglobin estimation
Modernizing your data center with Dell and AMD
Building Integrated photovoltaic BIPV_UPV.pdf
Chapter 3 Spatial Domain Image Processing.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Teaching material agriculture food technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Advanced methodologies resolving dimensionality complications for autism neur...
NewMind AI Monthly Chronicles - July 2025
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Reach Out and Touch Someone: Haptics and Empathic Computing
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Mobile App Security Testing_ A Comprehensive Guide.pdf
20250228 LYD VKU AI Blended-Learning.pptx

HTML5: An Introduction To Next Generation Web Development

  • 1. HTML5: Next Generation Web Development Tilak Joshi Senior Web Architect NASA Goddard Space Flight Center (Contractor) August 17th 2011
  • 2. What is HTML5? “HTML5 is a language for structuring and presenting content for the World Wide Web, a core technology of the Internet. It is the fifth revision of the HTML standard (originally created in 1990 and most recently standardized as HTML4 in 1997[1]) and as of August 2011[update] is still under development. Its core aims have been to improve the language with support for the latest multimedia while keeping it easily readable by humans and consistently understood by computers and devices (web browsers, parsers etc.). HTML5 is intended to subsume not only HTML4, but XHTML1 and DOM2HTML (particularly JavaScript) as well.[1]” – Wikipedia
  • 3. What is HTML5? HTML5 is the up and coming standard for next generation web development. It reduces focus on syntax and increases focus on features. It was created by developers and browsers to facilitate web programming and increase focus on more dynamic content. Included Features • New Elements ( <article>,<section>,<aside>,<nav>, etc.) • Native Audio/Video Support • Drawing APIs (Canvas, SVG, MathML, WebGL) • Geolocation • Drag and Drop • Web Forms 2.0 • Microdata • Local Storage • Web Sockets • Web Workers Fun Facts • HTML5 is the brainchild of WHATWG and was adopted by the W3C after much hesitation • Apple’s ongoing battle with Adobe was sparked by Apple choosing to support HTML5 over Flash • Contrary to popular belief, almost all current browsers provide support for most HTML5 features Official HTML5 Logo
  • 4. New Elements in HTML5 All new tags maintain the same style and element properties as <div> but have special meaning and possibly special interpretations by markup readers (crawlers) or browsers. When declaring these tags, in order to maintain backwards compatibility, style them as display:block in your stylesheet or internal style. These are most of the more important tags: • <article> – external content (news articles, blogs, etc) • <section> – sections of the web page (can contain multiple <article> tags) • <aside> - content related to, but not part of, the primary content • <nav>,<menu> - the primary navigation, any subnavigation • <header> - section before body, at the beginning of the page • <footer> - section after body, at the end of the page • <hgroup> - a group of headers (<h1> to <h6> tags) • <time> - a date or time • <figure>,<figcaption> - a figure and a caption describing it (could be a video or image)
  • 5. Native Audio/Video Support Current versions of browsers support audio/video, basic controls, a poster for video, duration hint, and more. They allow VP8, H.264, and OGG formats depending on browser, and allow you to specify a codec in the declaration. Code (Video): <video id="video1" width="480" height="260" poster=”firstframe.jpg" durationHint=”59" > <source type="video/webm" src=“vid.webm" /> <source src=“vid.mp4"/> <source src=“vid.ogv" /> <p>Error: video not supported</p> </video> Code (Audio): <audio src="song.ogg" controls="controls"> Your browser does not support the audio element. </audio> Supported Formats (video; audio): Mozilla Firefox – OGG, VP8; OGG, WAV Internet Explorer – H.264 natively, OGG and VP8 with manual install; MP3 WAV Google Chrome – OGG, H.264 (to be discontinued), VP8; OGG, WAV Apple Safari – H.264 natively, OGG and VP8 with manual install; MP3, WAV Opera – OGG, VP8; OGG, WAV
  • 6. Drawing API HTML5 supports many different APIs for drawing, eliminating the need for Flash, SilverLight, or other third-party tools. Currently supported APIs include Canvas and SVG. Partially supported APIs include MathML and WebGL. Canvas: HTML <canvas id=”canvas1" width=”600" height="200"> </canvas> JavaScript window.onload = function(){ var canvas = document.getElementById("myCanvas"); var context = canvas.getContext("2d"); context.moveTo(100, 150); context.lineTo(450, 50); context.lineWidth = 10; context.strokeStyle = "#ff0000"; // line color context.stroke(); }; SVG: HTML <svg id=”svg1” xmlns="http://www.w3.org/2000/svg"> <circle id=”circle1" cx="50" cy="50" r="50" fill="red" /> </svg>
  • 7. Geolocation Geolocation provides the user’s location. This is the closest position the User Agent can obtain, which in the case of a GPS enabled device is exact, and in the case of non-GPS enabled device is the location from the IP address, closest cell phone tower, or wireless network connection. Code: function get_location() { navigator.geolocation.getCurrentPosition( handlePosition ); } function handlePosition(position){ var longitude = position.coords.longitude; var latitude = position.coords.latitude; // use this info } Properties: coords.latitude – decimal degrees coords.longitude – decimal degrees coords.altitude - meters coords.accuracy - meters coords.speed – meters/second coords.altitudeAccuracy - meters coords.heading – degrees clockwise from true north timestamp – Date() Object Warning: User has to allow the browser to share their location. It is good practice to not to depend on this data.
  • 8. Drag and Drop Drag and Drop is natively allowed by overriding the default browser event of objects snapping back in place. Code: HTML <div id=‘drag1’ draggable=‘true’>I’m Drag1</div> <div id=‘drag2’ draggable=‘true’>I’m Drag2</div> <div id=‘dropArea’ ></div> JavaScript function allowDrop(e){ if(e.preventDefault){ e.preventDefault(); } return false; } var dropArea = document.getElementById(‘dropArea’); dropArea.ondragenter = allowDrop; dropArea.ondragover = allowDrop; New Events: ondragstart – when the draggable item begins to get dragged ondragenter – when the draggable item enters the droppable area ondragover – when the draggable item is in the droppable area ondrop – when the draggable item is dropped
  • 9. Web Forms 2.0 HTML5 has taken the more common recent input fields and officially standardized them. It provides browser built- in GUI and basic validation as required. New Input Types: email – current validation checks for ‘@’ sign and ‘.’ url – current validation checks for ‘.’ number – provides up and down arrows on the gui, and validates for a number range – provides a slider on the gui, and validates for a number date (date, month, week, time, datetime, datetime-local) – shows a picker search – currently behaves like a regular ‘text’ field color – provides a color picker on the gui New Input Type Attributes: min – min for the number (works for number and range types) max – max for the number (works for number and range types) step – step increment for the number (works for number and range types) Notes: Support is currently limited, but coming soon. It is encouraged to use it with shims and polyfills as support comes soon. There will be variation in the GUI and validation as each browser can handle the look and feel of the additional displayed features and the exact validation.
  • 10. Additional Features Microdata, Local Storage, and Web Workers are some of the additional features available in HTML5. Microdata: Specifies additional markup language, as per the specified namespace, to identify reviews, recipes, authors, businesses, products, and other information. This is most useful for screen readers like Google’s crawler to read and identify your content more accurately. Local Storage: Information can be stored in the browser without using cookies. This is less overhead and easy access to a lot of data in JSON format but it is not safe for secure data. Web Workers: This is a method for running javascript concurrently and making use of multiple processor CPUs. Additional Features: WebSockets, native JSON functions, Cross Domain Requests using AJAX
  • 11. Backwards Compatibility Polyfills or polyfiller or shim, is a piece of code (or plugin) that provides the technology that you, the developer, expect the browser to provide natively. Flattening the API landscape if you will. They can use third party technologies like Flash, SilverLight, or JavaScript and JQuery libraries. Modernizr: Modernizr.load({ test: Modernizr.geolocation, yep : 'geo.js', nope: 'geo-polyfill.js' }); WebShims: WebShims is a JavaScript library built on JQuery that provides polyfills for the most commonly used HTML5 features. $.webshims.setOptions('canvas', { type: 'flashpro' //excanvas | flash | flashpro }); Notes: There are polyfills available for every feature that I have covered and many more. These polyfills support browsers starting from IE6+, Firefox 3+ and more. This is a quick and easy method that increases browser compatibility until all browsers have full support for HTML5. Future versions of Modernizr 2.0 will have WebShims built in.
  • 12. 508 Compliance HTML5 does not hinder 508 compliance as everything that is visual does not apply, and everything that is not has similar fallbacks as HTML4 or XHTML (i.e. title tags, labels for inputs). The more descriptive tags and microdata allow a possibility for many 508 enhancements in the future. •All new elements available in HTML5 are the equivalent of HTML divs and can handle the ‘title’ attribute • The media-rich enhancements are just that, ‘enhancements.’ There should be text counterparts for functionality • Microdata offers better compliance options in the future • Better tag structure offers more options for future screen readers for compliance
  • 13. Extras: CSS3 Additions New attributes: • border-image • border-radius • @font-family • box-shadow • text-shadow Browser specific attributes: • -moz (Mozilla Browsers) • -o (Mozilla Browsers) • -webkit (Mozilla Browsers)