proper elements are used – <p> denotes paragraph – <ul> denotes an list of items, where the order is not important – <address> contains address information – <div> and <span> are used to describe information • HTML where extraneous elements are not misused – No <p> for line breaking – No <blockquote> for indentation – No <h1> for big text • HTML without presentation information – No <font>, <b>, <i> tags – No inline styles
bgcolor="#FFFFFF" border="10" bordercolor="#FFFFFF"> <tr><td> <table width="100%" bgcolor="#f0f0f0" border="0“> <tr> <td><h1> <font face="Palatino Linotype">The Awesome Blog of Awesome</font> </h1> </td> </tr> <tr> <td align="right"><p><i>Awesome is a State of Mind</i></ p></td> </tr> </table> <body> <div id="header"> <h1>The Awesome Blog of Awesome</h1> <p class="tagline"> Awesome is a State of Mind </p> </div> RELATIVELY UNSEMANTIC RELATIVELY SEMANTIC
<h1>The Awesome Blog of Awesome</h1> <p>Awesome is a State of Mind</p> </header> <nav> <ul> <li><a href="">Home</a></li> <li><a href="">Blog</a></li> <li><a href="">About</a></li> <li><a href="">Contact</a></li> </ul> </nav>
Blog of Awesome</h1> <p class="tagline">Awesome is a State of Mind</p> </div> <header> <hgroup> <h1>The Awesome Blog of Awesome</h1> <h2>Awesome is a State of Mind</h2> </hgroup> </header> HTML 5 PREVIOUSLY
H2 -‐ Awesome is a State of Mind H2 -‐ Recent Posts H3 I Made a Post Thingie H3 My Thoughts are made manifest H1 – Awesome Blog of Awesome H2 Recent Posts H3 I Made a Post Thingie H3 My Thoughts are made manifest NO HGROUP WITH HGROUP
push semantic HTML 5 • Are they really important? – Today: No – Tomorrow: Who knows? • But this is a semantically correct way of reducing classes and extraneous divs 22
• Date: 2011-09-20 • Datetime: 2011-09-20T20:00Z • Datetime: 2011-09-20T20:00+00:00 – Pubdate • Used with article to denote that this particular time is the publication date.
<header> <h1><a href="">I Made a Post Thingie</a></h1> <time datetime="2011-‐09-‐02">September 2, 2011</time> </header> <img src="img/captain-‐awesome.jpg" width="300" height="200" alt="Image of Captain Awesome" /> <p>DIY ea nulla photo booth tempor occaecat, velit nihil mixtape scenester. Irony laboris echo park, wolf officia vice cupidatat labore butcher freegan farm-‐to-‐table nisi velit aliqua gluten-‐free. Aliquip nesciunt assumenda, wayfarers seitan wolf reprehenderit nulla twee sartorial dolore food truck voluptate ex vinyl. Aliquip ex enim, irony terry richardson trust fund consectetur fap pariatur dolor. Lo-‐fi nulla whatever mlkshk, banksy american apparel carles adipisicing incididunt wolf photo booth hipster. Wayfarers four loko ex cosby sweater, adipisicing sartorial non cardigan craft beer cillum reprehenderit terry richardson 3 wolf moon mollit. Ethical ut labore beard, 3 wolf moon duis readymade assumenda hipster tofu mcsweeney's master cleanse.</p> </article> article header h1
the browser’s spellcheck interface • Uses: • No one spellchecks anything they post on the web • But you will have the moral high ground to point out on your site they could have. <p contenteditable="true" spellcheck="spellcheck" class="comment">Comment</p> spellcheck
HTML5 Semantics – http://diveintohtml5.org/semantics.html • HTML 5 Forms – http://wufoo.com/html5 – http://diveintohtml5.org/forms.html • HTML Status – http://caniuse.com 103