Slide 1: Why HTML5?
• HTML 5 will enable better cross-browser compatibility and better support for ‘Web 2.0-style’ Web applications. Provides Rich Text formatting • HTML5 will have an application cache that is capable of storing all resources in your Web app so that the browser can load them and use them even when you’re offline • HTML5 enables mobile and desktop Web site designers to deliver the advantages of client-side and server-side development to their users simultaneously. • New tags for semantic layout, incorporating rich media, APIs,applications..
Slide 2: Features of HTML 5
• Canvas • contentEditable • getElementByClassName • Offline storage • Video and audio • Web forms 2.0
Slide 3: Attributes
DesignMode - entire document contentEditable- element • Ins ertin g im ages • Three arguments • Five arguments • Nine arguments context.drawImage(img_elem, sx, sy, sw, sh, dx, dy, dw, dh);
Slide 4: New Tags
• article • aside • audio • canvas • command • datagrid • datalist • datatemplate • embed • event-source • figure • footer • header • mark • meter • nav • nest • output • progress • source • time • video
Slide 5: Structure of xHTML
•xHTML:
• <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Slide 6: HTML5 - basic document structure
• <!DOCTYPE HTML> • <html lang="en"> • • • • • • <head> <meta charset="UTF-8"> <title>HTML5</title> </head> <body> </body>
• </html>
Slide 7: Layout - HTML5
<header> <nav> <section> di
<article>
<aside>
<footer>
Slide 8: HTML5 - IE
<script type="text/javascript"> document.createelement('header'); </script> <header> javascript must be used to force IE to style this element </header> * Need to use javascript to force IE to recognize new HTML5 tags and apply CSS to them
Slide 9: <audio>,<video> and <canvas>
<audio src="/tunes/boom.mp3" controls="true"> <a href="/tunes/boom.mp3">Listen</a> </audio> <video src="/video/ac-testimonial-web.mov" controls="true"> <p>your browser does not support the video tag</p> </video>
<canvas id=”a_canvas” width=”400” height=”300”> <p>Oops! Your browser can’t display the canvas.</p> </canvas>
Slide 10: Problems with HTML5
• Not backwards-compatible? • <P> = <p> ...and... <div class=”foo”> = <DIV class=foo> • removal of certain tags - <acronym>