Introducing HTML5 – Book Review

One of the most eagerly awaited books on HTML5 is Introducing HTML5 by Bruce Lawson and Remy Sharp. These two have become sort of HTML5 evangelists (especially Bruce) and you can follow them both on Twitter at @brucel and @rem respectively.

Enough about them, what about the book?

Well in a marked difference from Jeremy Keith’s HTML5 for Web Designers, Introducing HTML5 is aimed more at developers, talking about some of the topics more in-depth and providing (amusing) coding examples and explanations. Remy Sharp provides some particularly useful JavaScript examples.

bruce lawson and remy sharp

The chapters alternate between the two authors, utilising their expertise to explain different parts of HTML5. Bruce talks markup and structure and Remy explains the JavaScript and erm… everything else. Given the picture of the two authors on the right (Bruce is on the left, Remy on the right), you can expect the book and examples to be a bit tongue in cheek and in some cases, ridiculous. However the code is complete and examples thorough.

So let’s take it from the top.


As with all good books on (relatively) new subjects, Introducing HTML5 begins with a short history of HTML5, where it came from, the philosophy behind it, and how it nearly never was.

Chapter 1: Main Structure

In this first chapter, Bruce talks about how to structure a HTML5 document. the new doctype is introduced, followed by some of the main new structural elements such as <header>, <footer>, <section>, and <article>, complete with explanations on what they’re used for and when they should be used, with clear examples of each.

Chapter 2: Text

Here Bruce goes into even more detail with regards to structuring a HTML5 document. A lot of new elements are introduced here, such as <aside>, <figure>, and <mark>, and again there are explanations of each and how and when to use them. There is also an example on how one might code up a blog in HTML5.

Bruce also talks about ARIA (Accessible Rich Internet Applications) and how it can be used to make a web page more accessible for devices such as screen readers.

In addition, changes to existing HTML elements are mentioned as are elements that HTML5 has deprecated.

introducing html5

Chapter 3: Forms

This chapter is concerned with HTML forms and HTML5 offers a lot of new functionality in this area. Bruce goes through each one, with explanations and examples, and there’s even a bit of JavaScript for validation purposes.

Chapter 4: Video and Audio

Possibly the most talked about feature that HTML5 brings to the table is audio and video embedded in the browser. Here both Bruce and Remy discuss these features and how to use them. There is also an in-depth section on how to create custom controls for these.

Chapter 5: Canvas

Heading into Remy’s forte, is the chapter on canvas. The canvas element provides an API for 2d drawing lines, fills, images, text, etc. Once again this chapter is filled with the basics to get going with the canvas element, and moves onto more complicated stuff such as capturing images from a video, altering individual pixels on an existing image (I wasn’t even aware you could do that!), and animating canvas drawings. All provided with examples of course.

Chapter 6: Data Storage

This chapter is concerned with the storage of data for web applications. Not in the traditional sense mind, with HTML5 data can be stored in the browser using Web Storage or Web SQL Databases. Remy Sharp talks about both methods here, peppered with example code, as usual.

Chapter 7: Offline

HTML5 also allows you to configure your web application to be available offline (i.e. when there’s no internet connection) using the cache manifest, and it is this that Remy talks about in this chapter. There are the usual explanations and example code, but also some tips and tricks to get it to work correctly in different browsers.

Chapter 8: Drag and Drop

Described as the black sheep of the book, and like it or loathe it, the drag and drop API is part of the HTML5 specification and despite it being a bit weird, it works. Mostly. This chapter does explain how to get drag and drop working on the various browsers, and also describes how to add custom drag (mouse) icons and talks about accessibility.

Chapter 9: Geolocation

Although the Geolocation API is NOT part of the HTML5 specification, Bruce and Remy have included it in the book because they think it’s cool. I like that sort of thinking. Basically this API provides a method of locating the exact(ish) position of a visitor to a website. The various API calls provided are discussed and examples given.

Chapter 10: Messages, Workers and Sockets

The Web Messaging API is actually part of the HTML5 specification, whereas Web Workers and Web Sockets are not, but they all use the Messaging API to communicate, so these are all introduced in this chapter. The Messaging API allows messages to be sent between domains, securely, and in this chapter Remy talks about how this can be accomplished, including some useful notes on how to debug them.


As you can see, there’s quite a lot in this book, but all of it is explained clearly with sufficient examples to get you going and to try things out for yourself.

As I mentioned before, I feel that this book is aimed more towards web developers as it is assumed that you already have a good understanding of HTML and at least a basic understanding of JavaScript, but this of course it not a bad thing.

All in all, a highly recommended read.