Cover by Eric Freeman, Elisabeth Robson

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 12. HTML5 Markup: Modern HTML

image with no caption

So, we’re sure you’ve heard the hype around HTML5. And, given how far along you are in this book, you’re probably wondering if you made the right purchase. Now, one thing to be clear about, up front, is that everything you’ve learned in this book has been HTML, and more specifically has met the HTML5 standard. But there are some new aspects of HTML markup that were added with the HTML5 standard that we haven’t covered yet, and that’s what we’re going to do in this chapter. Most of these additions are evolutionary, and you’re going to find you are quite comfortable with them given all the hard work you’ve already done in this book. There’s some revolutionary stuff too (like video), and we’ll talk about that in this chapter as well. So, let’s dive in and take a look at these new additions!

Rethinking HTML structure

Before we learn even more markup, let’s step back for a second...we’ve talked a lot about structure, but are <div>s really good structure? After all, the browser doesn’t really know your <div id="footer"> is a footer, it just knows it is a <div>, right? That seems rather unsatisfying, doesn’t it?

Much of the new HTML5 markup is aimed at recognizing how people structure their pages with <div>s and providing markup that is more specific, and better suited for certain kinds of structure. You see, when the browser (or search engines, or screen ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required