HTML and CSS Reference
In-Depth Information
This is perhaps one of those WTF? moments I mentioned in the
introduction. These three elements are (XHTML authors, are you
sitting down?) entirely optional, because browsers assume them
anyway. A quick glance under the browser hood with Opera
Dragonfl y confi rms this ( Figure 1.2 ).
FIGURE 1.2 Opera Dragonfly
debugger shows that browsers
add the missing elements.
Figure 1.3 shows it using the IE8 developer tools.
FIGURE 1.3 Internet Explorer
8, like all other browsers, adds
missing elements in the DOM.
(IE seems to swap <title> and
<meta> , however.)
Because browsers do this, HTML5 doesn't require these tags.
Nevertheless, omitting these elements from your markup is
likely to confuse the heck out of your co-workers. Also, skipping
the <html> tag hurts your screen reader users, as that's where
you set the primary language of the document:
<html lang=en>
Search WWH ::

Custom Search