Upgrade to Pro — share decks privately, control downloads, hide ads and more …

HTML5 Semantic Elements: A Deeper Dive

HTML5 Semantic Elements: A Deeper Dive

An overview of the new semantic elements in HTML5, with a greater focus on the outlining algorithm.

Idan Gazit

October 31, 2011
Tweet

More Decks by Idan Gazit

Other Decks in Programming

Transcript

  1. <div class="header"> <h1>BEST BLOG IN THE WORLD</h1> <div class="nav"> <ul>

    ... </ul> </div> </div> <div class="maincontent"> <h2>My Posts</h2> <div class="post"> <h3>A post</h3> ... </div> </div> <div class="footer"> <p>&copy; Natan Alterman</p> </div>
  2. <div class="header"> <h1>BEST BLOG IN THE WORLD</h1> <div class="nav"> <ul>

    ... </ul> </div> </div> <div class="maincontent"> <h2>My Posts</h2> <div class="post"> <h3>A post</h3> ... </div> </div> <div class="footer"> <p>&copy; Natan Alterman</p> </div>
  3. <header> <h1>BEST HTML5 BLOG IN THE WORLD</h1> <nav> <ul> ...

    </ul> </nav> </header> <section class="maincontent"> <header><h1>My Posts</h1></header> <aticle> <h1>A post title!</h1> ... </aticle> </section> <footer> <p>&copy; Natan Alterman</p> </footer>
  4. <header> <h1>BEST HTML5 BLOG IN THE WORLD</h1> <nav> <ul> ...

    </ul> </nav> </header> <section class="maincontent"> <header><h1>My Posts</h1></header> <aticle> <h1>A post title!</h1> ... </aticle> </section> <footer> <p>&copy; Natan Alterman</p> </footer>
  5. • BEST HTML5 BLOG IN THE WORLD • My Posts

    - A post title! - Another post title! - A really old post. http://gsnedders.html5.org/outiner/ http://dev.w3.org/html5/spec/Oveview.html#outine
  6. <h1>My Awesome Site</h1> <h1>About me</h1> <p>I like bananas</p> <h1>My Day

    Job</h1> <p>I eat bananas</p> <h1>Contact</h1> <p>[email protected]</p> •My Awesome Site •About Me •My Day Job •Contact
  7. <h1>My Awesome Site</h1> <section> <h1>About me</h1> <p>I like bananas</p> <section>

    <h1>My Day Job</h1> <p>I eat bananas</p> </section> </section> <section> <h1>Contact</h1> <p>[email protected]</p> </section> •My Awesome Site •About Me •My Day Job •Contact
  8. <h1>My Awesome Blog</h1> <aticle> <h1>I Love Cake!</h1> <h2>I love it

    so so much.</h2> … </aticle> <aticle> <h1>The Cake is a Lie!</h1> <h2>Don’t believe them!</h2> … </aticle> •My Awesome Blog •I Love Cake •I love it so so much. •The Cake is a Lie! •Don’t believe them!
  9. <h1>My Awesome Blog</h1> <aticle> <hgroup> <h1>I Love Cake!</h1> <h2>I love

    it so so much.</h2> </hgroup> … </aticle> <aticle> <hgroup> <h1>The Cake is a Lie!</h1> <h2>Don’t believe them!</h2> </hgroup> <div class=aticle_body> … </aticle> •My Awesome Blog •I Love Cake •The Cake is a Lie!
  10. <HEADER> and <FOOTER> go inside <ARTICLE> <SECTION> <NAV> <ASIDE> …but

    don’t affect the outine SECTIONING CONTENT
  11. <input type="date"> <input type="time"> <input type="datetime"> <input type="datetime-local"> <input type="month">

    <input type="week"> DATE AND TIME visit with a webkit browser, ike chrome: http://bit.ly/html5-input-tests