HTML and CSS Reference
What you can really expect from browsers
What you have read in Table 2-1 represents the HTML5 standard that browsers are expected
to comply with by the time the standard is officially approved and promulgated. At this time,
Opera and Chrome are likely the browsers that offer the best support for the current draft
of HTML5. In general, the support for HTML5 you can currently get from all browsers is not
The point is that HTML5 is not yet an approved standard and won't be definitive for a few
more years. At the same time, companies are eager to use HTML5 goodies in real websites
and applications. Websites and applications, however, require compliant browsers. As you can
imagine, this situation determines a sort of catch-me game between browser vendors. Each
new release of browsers improves support for the HTML5 standard or makes it more adherent
to the actual standard, removing possible features resulting from misinterpretation of older
HTML5 is not going to be something unambiguously defined for a few more years. Internet
Explorer 10—the browser you find integrated in Windows 8—improves significantly the sup-
port for HTML5 over Internet Explorer 9. Note that in Windows 8 you find two flavors of the
Internet Explorer browser—the classic version, which builds on top of Internet Explorer 9, and
the version with the native Windows 8 look-and-feel. This version, in particular, lacks the ability
to run plug-ins (specifically, Flash and Silverlight) and organize favorites in folders.
Making input fields auto-focusable
HTML5 provides the definitive solution to a couple of common problems that developers faced for
focus to an input field.
display of the page. In HTML5, you can use a new attribute for the <input> element—the autofocus
attribute. Try placing the following code in the body of a new HTML page named autofocus.html .
<input type="text" value="Dino" />
<input type="text" autofocus />
<input type="submit" value="Save" />
Save the page and display it in Internet Explorer. As Figure 2-7 shows, the cursor that indicates
input focus is on the second field.