html5

20
- <code>Gopinath T.M</code>

Upload: anubavam-techkt

Post on 16-May-2015

910 views

Category:

Education


0 download

DESCRIPTION

HTML5 intro by Gopinath T.M. on 7 Jan 2012

TRANSCRIPT

Page 1: Html5

- <code>Gopinath T.M</code>

Page 2: Html5

HTML5 will be the new standard for HTML, XHTML, and the HTML DOM.

WHATWG was working with web forms and applications, and W3C was working with XHTML 2.0. In 2006, they decided to cooperate and create a new version of HTML.

Page 3: Html5

The canvas element for drawingThe video and audio elements for media

playbackBetter support for local offline storageNew content specific elements, like article,

footer, header, nav, sectionNew form controls, like calendar, date, time,

email, url, search

Page 4: Html5

Document

DOM

HTML 5

text/html

XHTML 5

application/xhtml+xml

Page 5: Html5

HTML Older version Code<img src="path/to/image" alt="About image" /

>  <p>Image of Mars. </p>.HTML5

<figure><img src="path/to/image" alt="About

image" /><figcaption><p>This is an image of something

interesting.</p></figcaption>

</figure>

Page 6: Html5

HTML Older Version Code.<link rel="stylesheet"

href="path/to/stylesheet.css" type="text/css" /><script type="text/javascript“

src="path/to/script.js"></script>HTML5

<link rel="stylesheet" href="path/to/stylesheet.css" />

<script src="path/to/script.js"></script>

Page 7: Html5

HTML Older Version We need to add some client side script to

make the things happened.HTML5

<ul contenteditable="true"><li> Break mechanical cab driver.

</li><li> Drive to abandoned factory<li> Watch video of self </li>

</ul>

Page 8: Html5

Color date  datetime  datetime-local  email  File with multiple file selection. month  number  range  Search Tel time  url week

Page 9: Html5

HTML Older Version Code. <form action="" method="get">

<label for="email">Email:</label><input id="email" name="email" type=“text" /><button type="submit"> Submit Form </button>

</form>

HTML5 <form action="" method="get">

<label for="email">Email:</label><input id="email" name="email" type="email" /><button type="submit"> Submit Form </button>

</form>

Page 10: Html5

HTML Older VersionWe need to required some client side script to

validate the things.HTML5

<form method="post" action=""><label for="someInput"> Your Name:

</label><input type="text" id="someInput"

name="someInput" placeholder="Douglas Quaid" required>

<button type="submit">Go</button></form>

Page 11: Html5

HTML Older VersionWe need to add some client side script to make the

things happened.HTML5<form method="post" action="">

<label for="someInput"> Your Name: </label>

<input type="text" id="someInput" name="someInput" placeholder=“Enter your name" required>

<button type="submit">Go</button></form>

Page 12: Html5

HTML5<audio autoplay="autoplay"

controls="controls">

<source src="file.ogg" /><source src="file.mp3" /><a href="file.mp3">Download this

file.</a></audio>

Page 13: Html5

<video controls preload><source src="cohagenPhoneCall.ogv" type="video/ogg; codecs='vorbis, theora'" /><source src="cohagenPhoneCall.mp4" type="video/mp4; 'codecs='avc1.42E01E, mp4a.40.2'" /><p> Your browser is old. <a href="cohagenPhoneCall.mp4">Download this video instead.</a> </p></video>

Page 14: Html5
Page 15: Html5

<form action="" method="post"><label for="username">Create a Username:

</label> <input type="text"

name="username" id="username" placeholder="4 <> 10" pattern="[A-Za-z]{4,10}" autofocus required><button type="submit">Go </button>

</form>

Page 16: Html5

<h3> Search Results </h3><p> They were interrupted, just after Quato said, <mark>"Open your Mind"</mark>. </p>

Page 17: Html5

LocalStorage - stores data with no time limit<script type="text/javascript">

localStorage.lastname="Smith";document.write(localStorage.lastname);</script>

SessionStorage - stores data with one time session<script type="text/javascript">

sessionStorage.lastname="Smith";document.write(sessionStorage.lastname);</script>

Page 18: Html5

<canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">Your browser does not support the canvas element.</canvas><script type="text/javascript">var c=document.getElementById("myCanvas");var ctx=c.getContext("2d");ctx.fillStyle="#FF0000";ctx.fillRect(0,0,150,75);</script>

Page 19: Html5

http://html5test.com/

Page 20: Html5

www.developersnacks.com