O'Reilly logo

Programming the Mobile Web by Maximiliano Firtman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HTML 5

HTML 5 may not be finished yet, but it’s already transforming a wide variety of mobile web development tasks.

The Standard

At the time of this writing, HTML 5 is a draft for the future standard for website markup. It will replace both XHTML 1.1 and HTML 4.0, adding new markup, deprecating some existing tags (like font and center), and adding some new JavaScript APIs. You can find the latest documentation at http://dev.w3.org/html5.

Mobile browsers are very hungry for new features in web applications, and this hunger has driven these browsers to have partial support of HTML 5 before it’s available in desktop browsers. Many of the new elements that have been proposed (remember, HTML 5 is still a draft and in discussion) are semantic tags intended to reduce divitis (the abuse of the div tag). To this end, the draft standard includes new tags such as section, article, footer, nav, video, audio, canvas, and command.

It also adds support for new types of form controls, including tel, search, url, email, datetime, date, month, week, time, number, range, and color. For input tags, it also defines the attributes placeholder, autofocus, required, autocomplete, and pattern. (We’ve already discussed many of these new attributes, in Chapter 6.)

Note

Although this is not an HTML or JavaScript basics book, we are going to get deeper into some of the new HTML 5 features because they are new for almost every web developer. There are some new books appearing on the market for this new technology: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required