SlideShare a Scribd company logo
Building a Better
Web
with HTML5 and CSS3

                      By:
                            Karambir Singh Nain
How web works today

● HTML - Matter on the page


● CSS - Appearance of elements


● Javascript - Add interavtivity to Page
XHTML 4.0




                                                          XHTML 4.01                  HTML5




                                                                        4.01



        2.0
                        3.0       4.0


  95        96     97       9 8       9 9     00     01        02        03      05         07     09        11
19     19        19      19        19       20     20        20        20      20      20        20     20



                      Evolution of HTML Markups
HTML5 ???
● It is next version of HTML


● Work started in 2008


● 1st working draft released in June
  2011

● Is expected to completed in 2012
Question arises


What so peculiar about
HTML5?
Reasons
●   Accessibility
●   Video & Audio Support
●   DocType
●   Smarter Storage
●   Better Interactions
●   Legacy/Cross Browser support
●   Mobile
●   Canvas
●   WebGL
●   GeoLocation
Accessibility

 More Semantic HTML tags



      Cleaner Code
Earlier
<div id="header">

            <div id="nav">


<div id="article">   <div id="sidebar">




           <div id="footer">
Now
<header>

             <nav>


<section>              <aside>




            <footer>
Video & Audio Support

● Forget Flash

● No <embed> and <object> tags


● Inbuilt Media tags
example



<video src="url" width="
640px"
height="380px"
autoplay />
DocType
earlier:

<!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Transitional//EN" "http://www.w3.
org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

now:

<!DOCTYPE HTML>
Local Storage
1. Little bit of a cross between regular old cookies
   and a client-side database
2. Better than cookies because
   a. it allows for storage across multiple windows
   b. it has better security and performance
   c. data will persist even after the browser is
       closed
3. Because it is stored at client-side we don’t
   have to worry about the user deleting cookies
Local Storage - great

1. It is making web apps possible without third
   party plugins.
2. Being able to store data in the user’s
   browser allows you to easily create those
   app features like:
   ○ storing user information
   ○ the ability to cache data
   ○ the ability to load the user’s previous
       application state.
Better Interactions

●   Drag and Drop (DnD)

●   Browser history management

●   Document editing

●   Timed media playback
Cross Browser Support
● Modern, popular browsers all support HTML5 (Chrome,
    Firefox, Safari IE9 and Opera)
●   Even the really old and annoying ones, er, IE6 can use it. We
    can just simply add a Javascript shiv that will allow them to
    use the new elements:

<! --[if it IE 9]>
 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"
>
<! [endif] -->
Mobile Friendly
● Mobile devices are taking over the world

● HTML5 is the most mobile ready tool for
  developing mobile sites and apps

● Mobile browsers have fully adopted HTML5
  so creating mobile ready projects is as easy
  as designing and constructing for their
  smaller touch screen displays — hence the
  popularity of Responsive Design.
Some Great meta tags:
● Viewport: allows you to define viewport
  widths and zoom settings
● Full screen browsing: IOS specific values
  that allow Apple devices to display in full
  screen mode
● Home Screen Icons: like favicons on
  desktop, these icons are used to add
  favorites to the home screen of an IOS and
  Android mobile device
Canvas
● Canvas consists of a drawable region
  defined in HTML code with height and width
  attributes.
● JavaScript code may access the area
  through a full set of drawing functions similar
  to those of other common 2D APIs, thus
  allowing for dynamically generated graphics.
● uses of canvas include building graphs,
  animations, games, and image composition.
The following code creates a Canvas element in
an HTML page:
<canvas id="example" width="200" height="200">
This text is displayed if your browser does not
support HTML5 Canvas.
</canvas>

Using JavaScript, you can draw on the canvas:
var example = document.getElementById
('example');
var context = example.getContext('2d');
context.fillStyle = "rgb(255,0,0)";
context.fillRect(30, 30, 50, 50);
Canvas vs SVG
● Earlier standard for         ● Once the figure is
    drawing shapes in              drawn, the fact that it
    browsers.                      was drawn is forgotten
●   It is at a fundamentally       by the system.
    higher level because       ●   If its position were to be
    each drawn shape is            changed, the entire
    remembered as an               scene would need to be
    object in a scene graph        redrawn.
    or DOM                     ●   It is also possible to
●   If attributes of an SVG        paint a canvas in layers
    object are changed, the        and then recreate
    browser can                    specific layers.
    automatically re-render
    the scene.
WebGL
● Web-based Graphics Library is a software
  library that extends the capability of the
  JavaScript programming language to allow it
  to generate interactive 3D graphics within
  any compatible web browser.

● WebGL code executes on a computer
  display card's Graphics Processing Unit
  (GPU), which must support shader
  rendering.
Applicaions in HTML5
● HTML5 syntax and related Web-GL
  technology can help us build and play HD
  games using Graphics Card of Computer

● Will increase usage of web and cloud
  computing

● No need of increased Hard Disk Space
Native GeoLocation
navigator.geolocation.getCurrentPosition(
function(position){
position.coords.latitude,
position.coords.longitude
}
);

and you are can access the location of user.
Reference
● http://html5readiness.com/

● http://caniuse.com/

● http://beta.html5test.com/
Documentation
● http://dev.w3.org/html5/spec-author-view/

● https://developer.mozilla.org/en/HTML/HTML5

● http://www.whatwg.org/specs/web-
  apps/current-work/multipage/

● http://diveintohtml5.org/
Tools
● http://www.modernizr.com/

● http://code.google.com/p/html5shiv/

● http://html5boilerplate.com

● /http://gradients.glrzad.com/

● http://code.google.com/speed/tools.html
Community
● http://html5doctor.com/

● http://blog.whatwg.org/

● http://ajaxian.com/

● http://www.chromeexperiments.com/

● http://hacks.mozilla.org/
Books
● http://www.amazon.com/HTML5-Up-
  Running-Mark-Pilgrim/dp/0596806027

● http://introducinghtml5.com/
Thank You

More Related Content

PPTX
PDF
CollegeDiveIn presentation
PPSX
HTML5, CSS3, and JavaScript
PPTX
HTML5 & CSS3
PPTX
Introduction to html5
PDF
Google’s PRPL Web development pattern
PDF
Incremental DOM and Recent Trend of Frontend Development
PDF
Korea linuxforum2014 html5game-sangseoklim
CollegeDiveIn presentation
HTML5, CSS3, and JavaScript
HTML5 & CSS3
Introduction to html5
Google’s PRPL Web development pattern
Incremental DOM and Recent Trend of Frontend Development
Korea linuxforum2014 html5game-sangseoklim

What's hot (20)

PDF
What is HTML5
PPTX
PDF
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
PDF
Chrome Internals: Paint and Composition
PDF
Velocity dust
PDF
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
PPTX
Html5 Overview
ODP
Html5
PDF
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
PDF
Understanding Webkit Rendering
PPTX
New Elements & Features in HTML5
PDF
Front-End Frameworks: a quick overview
PDF
Basics of css and xhtml
PPTX
jQuery - the world's most popular java script library comes to XPages
PDF
Javascript - Getting started | DevCom ISITCom
PPTX
Edge of the Web
PDF
Using Web Standards to create Interactive Data Visualizations for the Web
PDF
jQuery Comes to XPages
PDF
Deview 2013 mobile browser internals and trends_20131022
KEY
WHAT IS HTML5? (at CSS Nite Osaka)
What is HTML5
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
Chrome Internals: Paint and Composition
Velocity dust
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
Html5 Overview
Html5
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Understanding Webkit Rendering
New Elements & Features in HTML5
Front-End Frameworks: a quick overview
Basics of css and xhtml
jQuery - the world's most popular java script library comes to XPages
Javascript - Getting started | DevCom ISITCom
Edge of the Web
Using Web Standards to create Interactive Data Visualizations for the Web
jQuery Comes to XPages
Deview 2013 mobile browser internals and trends_20131022
WHAT IS HTML5? (at CSS Nite Osaka)
Ad

Similar to Building a Better Web with HTML5 and CSS3 (20)

PDF
HTML5 Technical Executive Summary
PPT
HTML5: An Introduction To Next Generation Web Development
KEY
Introduction to HTML5/CSS3 In Drupal 7
PDF
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
PPT
HTML5 Presentation
KEY
Everything you need to know about HTML5 in 15 min
PPTX
HTML5: An Overview
PPTX
PDF
Html5 workshop part 1
PDF
HTML5: An Introduction To Next Generation Web Development
PPTX
PPT
Html5(2)
PPT
Html5(2)
PPTX
HTML5 - The Future in a Flash
PDF
Jsf2 html5-jazoon
PPTX
Html 5
PDF
East of Toronto .NET Usergroup - Put the 5 in HTML
PPTX
Presentation about html5 css3
PPTX
HTML 5 - A developers perspective
ZIP
Html5 public
HTML5 Technical Executive Summary
HTML5: An Introduction To Next Generation Web Development
Introduction to HTML5/CSS3 In Drupal 7
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
HTML5 Presentation
Everything you need to know about HTML5 in 15 min
HTML5: An Overview
Html5 workshop part 1
HTML5: An Introduction To Next Generation Web Development
Html5(2)
Html5(2)
HTML5 - The Future in a Flash
Jsf2 html5-jazoon
Html 5
East of Toronto .NET Usergroup - Put the 5 in HTML
Presentation about html5 css3
HTML 5 - A developers perspective
Html5 public
Ad

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Machine learning based COVID-19 study performance prediction
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Cloud computing and distributed systems.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
Teaching material agriculture food technology
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine learning based COVID-19 study performance prediction
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
The AUB Centre for AI in Media Proposal.docx
Per capita expenditure prediction using model stacking based on satellite ima...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
MYSQL Presentation for SQL database connectivity
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Reach Out and Touch Someone: Haptics and Empathic Computing
Review of recent advances in non-invasive hemoglobin estimation
Teaching material agriculture food technology
CIFDAQ's Market Insight: SEC Turns Pro Crypto
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Chapter 3 Spatial Domain Image Processing.pdf

Building a Better Web with HTML5 and CSS3

  • 1. Building a Better Web with HTML5 and CSS3 By: Karambir Singh Nain
  • 2. How web works today ● HTML - Matter on the page ● CSS - Appearance of elements ● Javascript - Add interavtivity to Page
  • 3. XHTML 4.0 XHTML 4.01 HTML5 4.01 2.0 3.0 4.0 95 96 97 9 8 9 9 00 01 02 03 05 07 09 11 19 19 19 19 19 20 20 20 20 20 20 20 20 Evolution of HTML Markups
  • 4. HTML5 ??? ● It is next version of HTML ● Work started in 2008 ● 1st working draft released in June 2011 ● Is expected to completed in 2012
  • 5. Question arises What so peculiar about HTML5?
  • 6. Reasons ● Accessibility ● Video & Audio Support ● DocType ● Smarter Storage ● Better Interactions ● Legacy/Cross Browser support ● Mobile ● Canvas ● WebGL ● GeoLocation
  • 7. Accessibility More Semantic HTML tags Cleaner Code
  • 9. <div id="header"> <div id="nav"> <div id="article"> <div id="sidebar"> <div id="footer">
  • 10. Now
  • 11. <header> <nav> <section> <aside> <footer>
  • 12. Video & Audio Support ● Forget Flash ● No <embed> and <object> tags ● Inbuilt Media tags
  • 14. DocType earlier: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3. org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> now: <!DOCTYPE HTML>
  • 15. Local Storage 1. Little bit of a cross between regular old cookies and a client-side database 2. Better than cookies because a. it allows for storage across multiple windows b. it has better security and performance c. data will persist even after the browser is closed 3. Because it is stored at client-side we don’t have to worry about the user deleting cookies
  • 16. Local Storage - great 1. It is making web apps possible without third party plugins. 2. Being able to store data in the user’s browser allows you to easily create those app features like: ○ storing user information ○ the ability to cache data ○ the ability to load the user’s previous application state.
  • 17. Better Interactions ● Drag and Drop (DnD) ● Browser history management ● Document editing ● Timed media playback
  • 18. Cross Browser Support ● Modern, popular browsers all support HTML5 (Chrome, Firefox, Safari IE9 and Opera) ● Even the really old and annoying ones, er, IE6 can use it. We can just simply add a Javascript shiv that will allow them to use the new elements: <! --[if it IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js" > <! [endif] -->
  • 19. Mobile Friendly ● Mobile devices are taking over the world ● HTML5 is the most mobile ready tool for developing mobile sites and apps ● Mobile browsers have fully adopted HTML5 so creating mobile ready projects is as easy as designing and constructing for their smaller touch screen displays — hence the popularity of Responsive Design.
  • 20. Some Great meta tags: ● Viewport: allows you to define viewport widths and zoom settings ● Full screen browsing: IOS specific values that allow Apple devices to display in full screen mode ● Home Screen Icons: like favicons on desktop, these icons are used to add favorites to the home screen of an IOS and Android mobile device
  • 21. Canvas ● Canvas consists of a drawable region defined in HTML code with height and width attributes. ● JavaScript code may access the area through a full set of drawing functions similar to those of other common 2D APIs, thus allowing for dynamically generated graphics. ● uses of canvas include building graphs, animations, games, and image composition.
  • 22. The following code creates a Canvas element in an HTML page: <canvas id="example" width="200" height="200"> This text is displayed if your browser does not support HTML5 Canvas. </canvas> Using JavaScript, you can draw on the canvas: var example = document.getElementById ('example'); var context = example.getContext('2d'); context.fillStyle = "rgb(255,0,0)"; context.fillRect(30, 30, 50, 50);
  • 23. Canvas vs SVG ● Earlier standard for ● Once the figure is drawing shapes in drawn, the fact that it browsers. was drawn is forgotten ● It is at a fundamentally by the system. higher level because ● If its position were to be each drawn shape is changed, the entire remembered as an scene would need to be object in a scene graph redrawn. or DOM ● It is also possible to ● If attributes of an SVG paint a canvas in layers object are changed, the and then recreate browser can specific layers. automatically re-render the scene.
  • 24. WebGL ● Web-based Graphics Library is a software library that extends the capability of the JavaScript programming language to allow it to generate interactive 3D graphics within any compatible web browser. ● WebGL code executes on a computer display card's Graphics Processing Unit (GPU), which must support shader rendering.
  • 25. Applicaions in HTML5 ● HTML5 syntax and related Web-GL technology can help us build and play HD games using Graphics Card of Computer ● Will increase usage of web and cloud computing ● No need of increased Hard Disk Space
  • 28. Documentation ● http://dev.w3.org/html5/spec-author-view/ ● https://developer.mozilla.org/en/HTML/HTML5 ● http://www.whatwg.org/specs/web- apps/current-work/multipage/ ● http://diveintohtml5.org/
  • 29. Tools ● http://www.modernizr.com/ ● http://code.google.com/p/html5shiv/ ● http://html5boilerplate.com ● /http://gradients.glrzad.com/ ● http://code.google.com/speed/tools.html
  • 30. Community ● http://html5doctor.com/ ● http://blog.whatwg.org/ ● http://ajaxian.com/ ● http://www.chromeexperiments.com/ ● http://hacks.mozilla.org/
  • 31. Books ● http://www.amazon.com/HTML5-Up- Running-Mark-Pilgrim/dp/0596806027 ● http://introducinghtml5.com/