58.4, November 2011

Tools of the Trade: Review of Four Books on HTML5

Avon J. Murphy

Introduction

If you've been writing HTML code over the past decade, you're going to find much changed with HTML5. New content tags make it possible to embed graphics, audio, and video without making visitors to your Web sites download plug-ins. New structural tags such as <nav>, <header>, <section>, and <article> force you to rethink the organization of your pages. Even if you write some bad code, visitors' browsers are far less apt to crash than in the past. What to do to get started? If you like to punish yourself, spend the next month digesting the full 900-page HTML5 specification (http://www.w3.org/TR/html5/). Or look into one of the four books described below. It's your choice.

HTML5 Step by Step

Faithe Wempen aims HTML5 Step by Step squarely at beginners. If you've never written HTML code, you'll appreciate her painstaking explanations of just about everything, including how to download the compressed file of practice code and how to use Notepad. The many reminders and cautions—which would drive experienced developers insane—come one after another to keep you out of trouble.

If you've used other Step by Step books, you'll recognize the series format, which is designed to make books so usable that it's impossible for you to get lost. Thus, you find ample white space, icons indicating tips, compatibility notes, troubleshooting hints, and other special points. Pages have a spacious feel, with ample white space. Screenshots are in grayscale, and headings, bullets, and note text appear in blue. If you prefer electronic text, you have free access to a PDF version of the book from Safari Books Online.

A chapter typically opens with a graphical “Chapter at a Glance” page and learning objectives, provides short code examples and exercises, and ends with a summary page of “Key Points.” Screenshots accompany almost every bit of HTML code.

Wempen provides solid details appropriate for neophytes on HTML5 structure and tagging, Cascading Style Sheets (CSS), graphics, navigation, audio and video, and JavaScript. The most successful chapter is “Creating Division-Based Layouts,” which compares how to use <div> tags with how to use new semantic tags. You might find more questionable inclusion of a 30-page chapter on Microsoft Expression Web. Also of little direct use are the appendixes on accessibility and usability, neither of which mentions HTML5 at all.

If you want a simple-to-read introduction with lots of screenshots, especially if you already feel comfortable with the Step by Step series, this book is your best bet.

(Disclosure: I've edited several Step by Step books for Microsoft Press.)

HTML5 24-Hour Trainer

The most exciting of our four books is Joseph W. Lowery and Mark Fletcher's HTML5 24-Hour Trainer. The authors see as their primary audience people just learning to construct Web pages. A secondary audience is those who know past versions of HTML but not HTML5.

This book pulls out nearly every stop possible to help you master the technologies and strategies of HTML5. Discussion of the various topics is accompanied by plentiful lists, tables, code snippets, screenshots, and boxes containing warnings and other special information. Each chapter provides at least one detailed “Try It” exercise. A big bonus is the enclosed DVD, which includes 42 video tutorials that reinforce the book's technical instruction very well. (Lowery is a popular author in the Lynda.com instructional video series.) You practice typing code along with the narrator (who provides further comments), using the files available as a single download from the Wrox Web site. This combination of methods lets you learn through reading, listening, watching, and doing at the same time. Although all artwork is done in grayscale, I didn't consciously think of that while reading the book and doing the exercises: I was too busy reading the text and typing while playing the videos.

You get excellent coverage of basic and intermediate topics, particularly the integration of HTML5 and CSS, media in your pages, lists and tables, and JavaScript. Some of the most useful information concerns your options when building forms and the compatibility of HTML5 features with particular browsers.

Given its many useful features and its amount of information, this package is a bargain.

Introducing HTML5

Bruce Lawson and Remy Sharp write for experienced (X)HTML developers who need a concise overview of how they must change their coding practices to take advantage of HTML5. Introducing HTML5, on the whole, provides solid explication of most major provisions of the specification; there is no attempt to make this book a teaching text.

The strongest chapters describe making 2D drawings with the <canvas> element and setting up data storage without using cookies, those small files you're always deleting as you browse the Web. You also get useful technical detail on accessibility, especially on using the Web Accessibility Initiative's Accessible Rich Internet Applications suite. In some other chapters, the descriptions don't contribute much information beyond what the World Wide Web Consortium (W3C) specification gives you for free.

The authors provide a good, smooth read. Now and then they surprise you with spots of humor, as when they note the disappearance of such elements as <frame> and <blink>: “You must avoid them as if they were tarantulas, zombies, man-eating tigers, plutonium sandwiches, or Celine Dion songs” (p. 60).

The book design uses little color except for orange in such areas as headings and information boxes. If you aren't reading carefully, the use of numbered lists, sometimes as bullets and sometimes as steps in a process, can be confusing.

The authors make available on the Web the graphics and HTML files for each chapter, as well as links to such resources as W3C documents. It would be much easier if you could simply download all the sample files at once instead of returning to the Web site and clicking individual files one after another. Also, the need to keep the book short means Lawson and Sharp can't refer to the filenames of the samples, so you can spend too much time making sure you have the right files.

As reliable a guide as this is for the established coder, its price is high for what you get.

Pro HTML5 Programming

Experienced Web application coders who know JavaScript can find in HTML5 a strong set of application programming interfaces (APIs), specifications that give them the means to create powerful features. If you're such a developer, Peter Lubbers, Brian Albers, and Frank Salim's Pro HTML5 Programming: Powerful APIs for Richer Internet Application Development gives you the details necessary to take advantage of the more promising APIs.

The introductory chapter sets the ground rules for using any API in the new HTML environment. Then comes the good stuff: detailed chapters on the HTML5 Canvas, audio and video, Geolocation, communication, WebSocket, Forms, Web Workers, Web Storage, and Offline Web Application APIs. The authors dissect often lengthy code samples (available as a single download from the Apress Web site), pursuing in depth the why and why not as well as the how of coding decisions. They make especially good use of tables to convey descriptions as well as pros and cons. The one thing that needs improvement is the grayscale screenshots, which sometimes include hard-to-see type.

The writing style is unusually relaxed for a highly technical book. Touches of humor at times sneak in: “If you want to know why or how [the Haversine] formula works, consult a teenager's math textbook” (p. 103).

Perhaps you don't want to become a programmer. But if you do want to do some API documentation or serve more effectively on a team alongside developers, Pro HTML5 Programming can arm you with detailed insight that you will find helpful. The amount of usable detail justifies the price, the highest in this roundup.

TABLE 1. Books on HTML5 Compared

HTML5 Step by Step

HTML5 24-Hour Trainer

Introducing HTML5

Pro HTML5 Programming

Audience

Beginner

Beginner to intermediate

Advanced

Advanced

Major Strengths

Format designed for easy reading and learning

Fully detailed explanations, especially on layout strategies

Many screenshots and code samples

Downloadable code

You're encouraged to practice your new skills

Comfortingly familiar Step by Step series look

Admirable integration of several instructional methods

Surprising amount of video content

Downloadable code

You're encouraged to practice your new skills

Sense of intellectual curiosity

Especially strong on forms and browser compatibility

Strongly independent voice on the significance of various features

Downloadable code

Especially strong on the <canvas> element, data storage, and accessibility

No wasted space

Enthusiastically reveals how to fine-tune coding for maximum effect

Downloadable code

Rigorous analysis of what makes each bit of sample code work

Especially strong on HTML5 and CSS integration

Natural peer-to-peer tone

Major Weaknesses

Contains some irrelevant material

Authorial remarks can become irksome

Grayscale screenshots

Overly familiar Step by Step series look

Grayscale printing

Some descriptions offer little original information

Grayscale screenshots

Confusing uses of numbered list format

Tedious process for downloading sample code

No encouragement to practice your new skills

Grayscale printing

Implicit rather than direct encouragement to practice your new skills

Comments

Trustworthy, detailed guide if you're a beginner who craves handholding. Good value.

Excellent value. Recommended for most HTML coders who haven't reached advanced status.

Trustworthy information delivered in a concise format. Fair value.

The amount of detail compressed into the book makes it a very good value.

Rating (5-star scale)

***

*****

***

****

Cost (USD)

$34.99

$39.99

$34.99

$44.99

References

Lawson, Bruce, & Sharp, Remy. (2011). Introducing HTML5. Berkeley, CA: New Riders. [ISBN 978-0-321-68729-6. 224 pages, including index. US$34.99 (softcover).]

Lowery, Joseph W., & Fletcher, Mark. (2011). HTML5 24-hour trainer. Indianapolis, IN: Wrox. [ISBN 978-0-470-64782-0. 300 pages, including index and DVD. US$39.99 (softcover).]

Lubbers, Peter, Albers, Brian, & Salim, Frank. (2010). Pro HTML5 programming: Powerful APIs for richer Internet application development. New York, NY: Apress. [ISBN 978-1-4302-2790-8. 284 pages, including index. US$44.99 (softcover).]

Wempen, Faithe. (2011). HTML5 step by step. Sebastopol, CA: Microsoft Press. [ISBN 978-0-7356-4526-4. 386 pages, including index. US$34.99 (softcover).]

About the Author

Avon J. Murphy is a technical editor in western Washington. A retired college professor and government writer, he is an STC Fellow, a contractor, and principal in Murphy Editing and Writing Services, specializing in computer and Web technologies. Avon served as Book Review Editor for Technical Communication for 17 years.