html5

35
<!DOCTYPE html> Brandon Byars [email protected]

Upload: brandon-byars

Post on 25-May-2015

195 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: HTML5

<!DOCTYPE html>

Brandon Byars

[email protected]

Page 2: HTML5

The HTML5 Ecosystem

HTML5 CSS3

new JavaScript APIs

Page 3: HTML5

XHTML

Page 4: HTML5
Page 5: HTML5

HTML

Page 6: HTML5

Going Semantic

Page 7: HTML5

<nav> <ul> <li><a href=“/”>Home</a></li> <li><a href=“/about”>About Us</a></li> <li> <a href=“/faq”> Frequently Asked Questions </a> </li> </ul></nav>

Page 8: HTML5

<section id=“magazine”>

<article>

<header>

<h1>Semantic Markup Rules!</h1>

<p>An overview of new elements</p>

</header>

<p>Lorem ipsum dolor set amet…</p>

<aside>For more details, see…</aside>

</article>

</section>

Page 9: HTML5

<big>

<center>

<font>

<strike>

<u>

<tt>

<frame>

<tablealign=“left”bgcolor=“#ff0”border=“1px”cellpadding=“2px”cellspacing=“2px”

/>

Page 10: HTML5

<input type="tel" />

Page 11: HTML5

<input type="url" />

Page 12: HTML5

<input type="email" />

Page 13: HTML5

<input type="number" />

Page 14: HTML5

<form action="/newAttributes">

<input type=text autofocus />

<input type=email

placeholder="[email protected]" />

<input type=email required />

<input type=text pattern="^[1-9]+[0-

9]*$" />

</form>

Page 15: HTML5

<img draggable="true" />

function drag(ev) { ev.dataTransfer.setData

("Text",ev.target.id); }

function allowDrop(ev) { ev.preventDefault(); }

function drop(ev) {

var data=ev.dataTransfer.getData("Text");

ev.target.appendChild(document.getElementById(d

ata));

ev.preventDefault();

}

Page 16: HTML5

Multimedia

Audio

Video

Canvas

SVG

Page 17: HTML5

<video width="320" height="240”

controls="controls">

<source src="movie.mp4"

type="video/mp4" />

<source src="movie.ogg" type="video/ogg" />

Your browser does not support the video tag.

</video>

Page 18: HTML5

http://www.kaltura.org/apis/html5lib/kplayer-examples/Player_Themable.html

Page 19: HTML5

http://www.effectgames.com/demos/canvascycle/

Page 20: HTML5

SVG

Page 21: HTML5

CACHE MANIFEST

# 2012-02-21 v1.0.0

/theme.css

/logo.gif

/main.js

NETWORK:

*

<html manifest="demo.appcache">

Page 22: HTML5

CSS

Page 23: HTML5

CSS3 Selectorsp:nth-of-type(2n+1) {color: red;}

p:nth-child(2n+1) {color: red;}

#content {

column-count: 2;

column-gap: 20px;

column-rule: 1px solid #ddccb5;

}

span.weight:after { content: "lbs"; color: #bbb; }

Page 24: HTML5

<style media="only all and (max-

width: 480)" />

Page 25: HTML5

CSS3 Transforms

• Rotate

• Scale

• Skew

• Matrix

Page 26: HTML5

@font-face {

font-family: AwesomeFont;

src:

url(http://example.com/awesomeco.ttf)

;

font-weight: bold;

}

Page 27: HTML5

JavaScript

Page 28: HTML5

localStorage.awesome = "true";

alert(sessionStorage.coolness);

JavaScript Engine

localstorage

sessionstorage

Page 29: HTML5
Page 30: HTML5
Page 31: HTML5

More JavaScript

• Browser history

• Web workers

• File APIs

• Cross document messaging

• Touch events

Page 32: HTML5

http://caniuse.com

Page 33: HTML5

http://html5readiness.com/

Page 34: HTML5

HTML5 compatible

phones to top

1 billion

in

2013

Looking to the Future…

Page 35: HTML5