chapter one

Chapter 1. Introducing HTML5 markup

 

This chapter covers

  • New semantic elements in HTML5
  • Updated HTML4 elements
  • New global attributes
  • The HTML5 content model
  • Getting new elements to work in old browsers

This chapter assumes you have some knowledge of previous versions of HTML. If you’re new to HTML, check out appendix B—it should give you enough information to understand this chapter.

We’ll start with some background on how and why the particular set of new elements in HTML5 was chosen. Then we’ll examine new elements for the overall structure of web pages before moving on to elements, both new and redefined, intended for particular bits of content. You’ll then learn about the new attributes in HTML5. Next, we’ll spend a few pages considering the more conceptual issue of the new approach to element categorization in HTML5. Finally, you’ll go back to practicalities and learn how to make sure your new HTML5 content will work in old browsers.

Why do we need new elements?

This section looks at some of the research that went into understanding the document structures that web authors were trying to describe semantically with HTML; this information was used to decide which new elements should be added in HTML5. We’ll then look at each of the new elements in turn.

New elements for page structure

The HTML DOCTYPE

New elements for content

HTML5’s new global attributes

The HTML5 content model

Browser support

Summary