Introducing HTML5: a book review

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 (-webkit-transform, -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.

11 thoughts on “Introducing HTML5: a book review

  1. Remy says:

    Stuart – thanks for taking the time to review the book – and fair points about cookies. Since writing that chapter (I think it was the first one I’ve wrote) – you’re absolutely right, cookies have their strengths and I’ve changes my tack on how I present that during talks. Their strength is in sharing with a server – but you know all that.

    Re: editors – well said, and no doubt we’ll pass this on to the publishers.

    Again – cheers :)

  2. bruce says:

    Thanks for the review Stuart. The typos are annoying, I agree. The proofreader was evidently dyslexic. I’ll talk to the publisher and hope they do a better job with the second edition.

  3. Zeeshan Ali says:

    I was looking for a nice HTML5 book to buy. I already pre-ordered “HTML5: Up and Running” on amazon but seem its getting more and more delayed so I’ll just cancel that order and get this one. Thanks for your timely review. :)

  4. erik says:

    As a experienced web developer who already played around a bit with canvas and has read some stuff about HTML5. Is this a good book or will it simply tell me stuff i already read elsewhere?

  5. sil says:

    Erik: I’d suggest that the book will show you ways to think about all this stuff that you hadn’t currently thought of. If you’re particularly diligent in following everything to do with HTML5 then you’ll have heard of everything mentioned in the book, but you may not have mentally constructed what it all means, and the book will help you do that. That’s why I recommend it.

  6. steve says:

    Would this book be good for someone who programs, but hasn’t coded up HTML since the Geocities days or would there be something that you’d suggest reading first?

    Thanks!

  7. sil says:

    steve: I’d go for IH5 alone, at first. You might want to have a web resource or two around in case some of it’s baffling, but it shouldn’t be. What you’ve missed out on in the days since Geocities is the idea that HTML should be written in such a way that it describes what your text *is*, rather than what you want it to look like. So a list of things is marked up as a ul containing li elements (because it’s a list), not just a load of bits of text separated be br elements (which will look like a list on screen but isn’t actually a list). If you grab that idea with both hands, IH5 should make sense to you.

    You might want to pick up JavaScript: The Good Parts by Douglas Crockford if you’ve never done any JavaScript, though.

  8. steve says:

    Thanks for the heads up! I will pick up both of the books you’ve recommended and enter the 21st century!

    Thanks again.

  9. Massimo says:

    I want to get a good HTML5 book for my wife who’s a proficient flash/flex developer. Is this the right book or would HTML5: Up and Running be better suited for her?

  10. Massimo says:

    I want to get a good HTML5 book for my wife who’s a proficient flash/flex developer. Is this the right book or would HTML5: Up and Running be better suited for her?

  11. sil says:

    Massimo: I’d recommend this, especially since the second edition has just come out!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>