There are two types of technical books. Reference manuals are useful; you always have them to hand, and you can jump in and find a particular page which gives you the stuff you need to know. They’re an indispensable reference tool, unless, say, you have access to the internet. Then, well, maybe they’re not as handy. On the other hand, there’s the other sort of technical book; the sort that’s a pleasure to read in itself, and you only realised you’ve learned things afterwards. Such a book is Introducing HTML 5, by Bruce Lawson and Remy Sharp. As they say at the beginning of the introduction: welcome to the Remy and Bruce show. The book manages to be both a thorough introduction to the swathe of modern and new web technologies masquerading under the name of “HTML5″, and a personal voice which comments on the state of web development today and in the near future. The tl;dr summary for people who don’t want to read the rest: good web book is good. Get it.
The book successfully and intelligently covers the new markup in HTML5 (nav/header/section/article, new input types in forms, and WAI-ARIA accessibility) as well as the vast proliferation of new APIs available to modern web applications (canvas, multimedia, offline storage, workers, and geolocation, among others), drawing on the authors’ experience of user questions and articles at their html5doctor site. Fortunately, it’s not a hagiography, and they don’t hesitate to stick the boot in where it’s warranted; the current mess that is native drag-and-drop support in browsers and the ridiculous codec war inherent in online video both come in line for a justified kicking. Each chapter covers its material in decent detail, without devolving into a mere list of APIs; the book is full of both worked examples and links to relevant extra resources. Unusually for a book of this type, the examples are fairly real-world; instead of a contrived writeup to show off a feature, they show how to mark up the home page of the Guardian newspaper with HTML5 elements.
Conspicuously missing from the book are the major changes to CSS currently being implemented in browsers. A chapter covering the transform and similar CSS3 declarations (
-moz-transform, and the like) would have fit nicely, and it’s a shame that this wasn’t covered — yes, it’s a book about HTML5, not CSS3, but the authors themselves admit that by “HTML5″ they actually mean “HTML5 and related specifications that came from the WHATWG”, and they throw in geolocation just because “it’s really cool”. Advances in CSS which give dynamic effects not only would fit well with the other subject matter but would also make a few of the examples perhaps easier.
The canvas chapter doesn’t bring much more than innumerable web pages covering the basics of the canvas API for drawing, but it covers those basics well and in a readable way. Importantly, there’s also a discussion of the difference between using the canvas element for drawing and using SVG, and when you’d choose one rather than the other. It’s been difficult to find that sort of summary; it’s equally difficult to decide yourself which to use for some new project, and the chapter’s sidebar (or <aside>?) discussion of “when to use which” clarified the distinction well, especially when going beyond reimplementations of Super Mario Bros inside the browser.
All is not sweetness and light, mind. The data storage chapter, explaining how to use HTML5′s new in-the-browser storage objects, breathlessly explains that this means an end to cookies (which are “rubbish” according to the authors). However, this is where their client-side bias seems to be coming through. Cookies are shared with the server, too; snazzy HTML5 storage is not. Any even reasonably detailed web application will have a substantial server component, and abandoning cookies will make it jolly hard to have the server and the front-end share data. This does seem rather like excitement over the new tech without thinking about how it can actually be used in real-world situations, and is disappointing from a book which goes out of its way to give suggestions that are actually useful to people.
Another area the book falls down is in its editing: there are typos scattered throughout the text (including in a heading in the introduction, for goodness’ sake!) and these should have been caught by an editor; noticing them distracts the reader from the material, and it’s a schoolboy error which damages the impact of the book.
I know both the authors, and they’re both well-known and respected in the web development community; Introducing HTML5 does them credit, and it’s worth your time. Go forth, get Introducing HTML5, and make great web stuff.