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

What's hot (20)

PDF
What is HTML5
Kyohei Morimoto
 
PPTX
Html5
Zeeshan Ahmed
 
PDF
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
Sadaaki HIRAI
 
PDF
Chrome Internals: Paint and Composition
Dzmitry Varabei
 
PDF
Velocity dust
Veena Basavaraj
 
PDF
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
Sadaaki HIRAI
 
PPTX
Html5 Overview
Daniel Arndt Alves
 
ODP
Html5
mikusuraj
 
PDF
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Sadaaki HIRAI
 
PDF
Understanding Webkit Rendering
Ariya Hidayat
 
PPTX
New Elements & Features in HTML5
Jamshid Hashimi
 
PDF
Front-End Frameworks: a quick overview
Diacode
 
PDF
Basics of css and xhtml
sagaroceanic11
 
PPTX
jQuery - the world's most popular java script library comes to XPages
Mark Roden
 
PDF
Javascript - Getting started | DevCom ISITCom
Hamdi Hmidi
 
PPTX
Edge of the Web
Todd Anglin
 
PDF
Using Web Standards to create Interactive Data Visualizations for the Web
philogb
 
PDF
jQuery Comes to XPages
Teamstudio
 
PDF
Deview 2013 mobile browser internals and trends_20131022
NAVER D2
 
KEY
WHAT IS HTML5? (at CSS Nite Osaka)
Shumpei Shiraishi
 
What is HTML5
Kyohei Morimoto
 
HTML5ではないサイトを HTML5へ - Change HTML5 from Not HTML5.
Sadaaki HIRAI
 
Chrome Internals: Paint and Composition
Dzmitry Varabei
 
Velocity dust
Veena Basavaraj
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
Sadaaki HIRAI
 
Html5 Overview
Daniel Arndt Alves
 
Html5
mikusuraj
 
Familiar HTML5 - 事例とサンプルコードから学ぶ 身近で普通に使わているHTML5
Sadaaki HIRAI
 
Understanding Webkit Rendering
Ariya Hidayat
 
New Elements & Features in HTML5
Jamshid Hashimi
 
Front-End Frameworks: a quick overview
Diacode
 
Basics of css and xhtml
sagaroceanic11
 
jQuery - the world's most popular java script library comes to XPages
Mark Roden
 
Javascript - Getting started | DevCom ISITCom
Hamdi Hmidi
 
Edge of the Web
Todd Anglin
 
Using Web Standards to create Interactive Data Visualizations for the Web
philogb
 
jQuery Comes to XPages
Teamstudio
 
Deview 2013 mobile browser internals and trends_20131022
NAVER D2
 
WHAT IS HTML5? (at CSS Nite Osaka)
Shumpei Shiraishi
 

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

PDF
HTML5 Technical Executive Summary
Gilad Khen
 
PPT
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi
 
KEY
Introduction to HTML5/CSS3 In Drupal 7
Mediacurrent
 
PDF
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
PPT
HTML5 Presentation
vs4vijay
 
KEY
Everything you need to know about HTML5 in 15 min
Edgar Parada
 
PPTX
HTML5: An Overview
Nagendra Um
 
PPTX
Html5
Zahin Omar Alwa
 
PDF
Html5 workshop part 1
NAILBITER
 
PDF
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi
 
PPTX
Html5
Mahmoud Ghoz
 
PPT
Html5(2)
Carol Maughan
 
PPT
Html5(2)
CMaughan
 
PPTX
HTML5 - The Future in a Flash
Rick Snailum
 
PDF
Jsf2 html5-jazoon
Roger Kitain
 
PPTX
Html 5
Nguyen Quang
 
PDF
East of Toronto .NET Usergroup - Put the 5 in HTML
Frédéric Harper
 
PPTX
Presentation about html5 css3
Gopi A
 
PPTX
HTML 5 - A developers perspective
Santhosh Kumar Srinivasan
 
ZIP
Html5 public
doodlemoonch
 
HTML5 Technical Executive Summary
Gilad Khen
 
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi
 
Introduction to HTML5/CSS3 In Drupal 7
Mediacurrent
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
HTML5 Presentation
vs4vijay
 
Everything you need to know about HTML5 in 15 min
Edgar Parada
 
HTML5: An Overview
Nagendra Um
 
Html5 workshop part 1
NAILBITER
 
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi
 
Html5(2)
Carol Maughan
 
Html5(2)
CMaughan
 
HTML5 - The Future in a Flash
Rick Snailum
 
Jsf2 html5-jazoon
Roger Kitain
 
Html 5
Nguyen Quang
 
East of Toronto .NET Usergroup - Put the 5 in HTML
Frédéric Harper
 
Presentation about html5 css3
Gopi A
 
HTML 5 - A developers perspective
Santhosh Kumar Srinivasan
 
Html5 public
doodlemoonch
 
Ad

Recently uploaded (20)

PDF
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PPTX
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
FME in Overdrive: Unleashing the Power of Parallel Processing
Safe Software
 
PDF
Deploy Faster, Run Smarter: Learn Containers with QNAP
QNAP Marketing
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
FME in Overdrive: Unleashing the Power of Parallel Processing
Safe Software
 
Deploy Faster, Run Smarter: Learn Containers with QNAP
QNAP Marketing
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
Kubernetes - Architecture & Components.pdf
geethak285
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
Ad

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/