HTML5 Guidelines for Web Developers

(coco) #1

2 Structure and Semantics for Documents


Both the previously mentioned MAMA survey conducted by Opera and Google’s
study of Web Authoring Statistics of 2005 (http://code.google.com/webstats)
conclude that it was common practice at that time to determine the page struc-
ture of web sites with the class or id attribute. Frequently used attribute val-
ues were footer, content, menu, title, header, top, main, and nav, and it therefore
made sense to factor the current practice into the new HTML5 specification and
to create new elements for structuring pages.


The result is a compact set of new structural elements—for example, header,
hgroup, article, section, aside, footer, and nav—that facilitate a clear page
structure without detours via class or id. To illustrate this, we will use a fictitious
and not entirely serious HTML5 blog entry to risk a look ahead to the year 2022
(see Figure 2.1). But please concentrate less on the content of the post and focus
instead on the document structure.


19
Free download pdf