HTML and CSS Reference
The rendering modes are Standards, Almost Standards, and Quirks
mode. These modes represent various stages in the history of browser
development and allow modern browsers to display old web pages the
way they were intended. See appendix C for a discussion of these fac-
tors—the short version is, Standards mode is what you want.
HTML5 is defined in terms of its DOM representation after parsing, so
it doesn't need a DOCTYPE for validation, but we still want legacy brows-
ers to render pages in standards-compliant mode. With this in mind,
the authors of the HTML5 spec worked out the minimal amount of
markup required to trigger Standards mode in browsers:
Compare this with similar declarations for HTML4 and XHTML1 :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
You can see that the HTML5 DOCTYPE is much shorter, easier to type,
and easier to remember.
New elements for content
There are several other new or redefined elements in HTML5 , and in
this section you'll learn about some of them. HTML5 includes dedi-
cated elements for dates as well as figures and captions, all common
elements of modern web pages. It also rehabilitates the <b> and <i> ele-
ments that were deprecated in HTML4 . This section looks at each of
these in turn.
The <time> element allows an unambiguous ISO 8601 date to be
attached to a human-readable version of that date. This is useful if you
want some other website or service to look at your web pages and
extract information. A common use case for this is that you're advertis-
ing an event on your website and you'd like it to appear in search
results for queries such as “events in London next week.” Alternatively,