740 likes | 1.05k Views
HTML5 & CSS3. A Practical Guide To. HTML5. New Elements Forms Semantics Javascript. CSS3. Selectors Properties Fonts. WHATWG TF?. WHYHTML5?. XHTML Head. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
E N D
HTML5 & CSS3 • A Practical Guide To
HTML5 • New Elements • Forms • Semantics • Javascript
CSS3 • Selectors • Properties • Fonts
XHTML Head • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" • "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> • <html xmlns="http://www.w3.org/1999/xhtml"> • <head> • <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> • <link rel="stylesheet" href="" media="screen,projection" type="text/css" /> • <script src="" type="text/javascript"></script> • </head>
HTML5 Head • <!DOCTYPE html> • <html> • <head> • <meta charset="utf-8"> • <link rel="stylesheet" href=""> • <script src=""></script> • </head>
<article> <aside> <audio> <canvas> <command> <datalist> <details> New HTML5 Elements <figure> <footer> <header> <hgroup> <keygen> <mark> <nav> <output> <progress> <ruby> <section> <source> <summary> <time> <video>
<article> <aside> <audio> <canvas> <command> <datalist> <details> New HTML5 Elements <figure> <footer> <header> <hgroup> <keygen> <mark> <nav> <output> <progress> <ruby> <section> <source> <summary> <time> <video>
<article> <aside> <audio> <canvas> <command> <datalist> <details> New HTML5 Elements <figure> <footer> <header> <hgroup> <keygen> <mark> <nav> <output> <progress> <ruby> <section> <source> <summary> <time> <video>
<article> <aside> <audio> <canvas> <command> <datalist> <details> New HTML5 Elements <figure> <footer> <header> <hgroup> <keygen> <mark> <nav> <output> <progress> <ruby> <section> <source> <summary> <time> <video>
<header> • <header> • <h1>Dontcom</h1> • <h2>The home of Darren Wood</h2> • </header>
<footer> • <footer> • <p>© Darren Wood 2010</p> • </footer>
<nav> • <nav> • <ul> • <li><a href="/">Home</a></li> • <li><a href="/about">About</a></li> • ... • </ul> • </nav>
<aside> • <aside> • <h2>Blogroll</h2> • <ul> • <li><a href="#">Keith</a></li> • <li><a href="#">Amber</a></li> • <li><a href="#">Kim</a></li> • </ul> • </aside>
<section> • <section> • <h1>Level 1</h1> • <section> • <h1>Level 2</h1> • <section> • <h1>Level 3</h1> • </section> • </section> • </section>
<article> • <article> • <header> • <h1>Blog Post Title</h1> • <h2>Sub title</h2> • </header> • <p>Synergistically optimize flexible communities • via cross-unit information. Objectively impact • bricks-and-clicks catalysts forchange rather • than reliable.</p> • </article>
<video> • <video controls poster="poster.jpg" width="320" height="240"> • <source src="video.ogv" /> • <source src="video.m4v" /> • <!–- silverlight/flash embed here --> • </video>
<audio> SEE VIDEO
type= search email url tel range number date datetime datetime-local time month color
placeholder="enter something here“ Autofocus Required autocomplete="off"
The most awesomest thing • <a href="/about"> • <h1>About Us</h1> • <h2>Learn more about what we do</h2> • </a>
Drag & Drop dragover dragenter drop dataTransfer
Canvas var canvas = document.getElementById("c"), context = canvas.getContext("2d"); context.fillRect(10, 20, 200, 100);
Get Elements by Class Name document.getElementsByClassName('test'); document.querySelectorAll('.testClass');
Client/Web Storage localStorage
Offline Application Cache <html manifest="/cache.manifest">
E[att^=”val”] E[att$=”val”] E[att*=”val”] E:root E:nth-child(n) E:nth-last-child(n) E:nth-of-type(n) CSS3 selectors E:nth-last-of-type(n) E:last-child E:first-of-type E:last-of-type E:only-child E:only-of-type E:empty E:target E:enabled E:disabled E:checked E::selection E:not(s) E ~ F
Substring matching attribute selector div[class^="nav"] { background:#ff0; } div[class$="nav"] { background:#ff0; } div[class*="nav"] { background:#ff0; }
The :nth-child() pseudo-class p:nth-child(3) { color:#f00; } li:nth-child(odd) { color: #eee; } li:nth-child(3n+10) {color: #eee; }
The :last-child pseudo-class li:last-child { border-bottom: 0; }
The :empty pseudo class p:empty { display: none; }
The ::selection pseudo class p::selected { background: #ff9; }