![](https://csdnimg.cn/release/download_crawler_static/10170187/bg12.jpg)
CSS3: THE MISSING MANUAL
6
HTML5: THE
WHEEL TURNS
AGAIN
Ad
ditionally, HTML doesn’t work with one of the hottest Internet languages:
XML
,
or Extensible Markup Language.
To keep pace with the times, an improved version of HTML, called
XHT
ML, was
introduced back in 2000, and you’ll find it used frequently on many sites (in fact,
XHT
ML is just an “
XML
-ified” version of HTML).
XHT
ML was seen as the future
(back in 2000), but has since been supplanted by HTML5. While web browsers still
understand
XHT
ML (and probably will for a long time), this book doesn’t include it.
HTML5: The W
heel Turns Again
Whe
n the W3C—the group responsible for many Internet technologies—introduced
XHT
ML as an intermediate step in the transition to
XML a
s the prime language of
the Web, the web development community heralded it as the next big thing. His
-
tory has shown that prediction to be a bit grandiose. As it turns out, the complexity
of moving to
XML k
ept browser manufacturers from following the
XML p
ath the
World Wide Web Consortium laid down. Instead, the W3C closed down the
XHT
ML
working group in favor of HTML5—a new version of HTML that a moves away from
XML a
nd back to HTML, albeit an enhanced version. With the support of all browser
manufacturers, HTML5 is the new next big thing. Some browsers, including Google
Chrome and Firefox, already recognize parts of HTML5, and even mainstream news
outlets like Time, Newsweek, and CNN drop “HTML5” into their technology reporting.
HTML5 isn’t some radically new technology. In fact, unlike
XHT
ML, which was in
-
tended to foster a new way to build web pages, HTML5 is about making sure the
Web continues to work the way it always has. Most of the basics of HTML are still
in place. Also, HTML5 adds a few new elements, meant to support the way web
designers currently build websites. For example, in HTML5, the <header> tag can
contain the content you’d usually find at the top of a page, such as a logo and site-
wide navigation links; the new <nav> tag encloses the set of links used to navigate a
site; and the <footer> tag houses the stu you usually put at the bottom of a page,
like legal notices, email contacts, and so on.
In addition, HTML5 adds new tags that let you insert video and audio into a page,
and new form tags that add sophisticated elements, like sliders and pop-up date
pickers, as well as built-in browser support for form validation (which ensures
visitors correctly fill out your forms). Unfortunately, browser support for these new
features isn’t consistent, and it’s dicult to use the new tags without some pretty
elaborate workarounds.
Although HTML5 may not be entirely ready for primetime, there’s no reason not to
start using the HTML5 doctype and even some basic HTML5 now. (You’ll need to
give Internet Explorer 8 and earlier a bit of help, though; see the box on page 24.)
You’ll find HTML5 throughout this book, especially in the next chapter.