Review: HTML5 Hacks

HTML5 is REALLY doing some great things for web developers. It has breathed new life in to web applications and with the advancements made in CSS3, it’s feasible to build a full fledged application that runs without any installation for your users on their desktop, tablet, and mobile phone with minimal changes to you. I’ll admit that I know quite a bit about HTML, but HTML5 was a new world for me in a lot of ways. Knowing the right code or “hacks” to make this work against all the different browsers is what HTML5 Hacks by Jesse Cravens and Jeff Burtoft provides for developers new and experienced.

This book is structured to provide the overview/explanation of a concept (such as the dragging and dropping div elements), and then outline some “hacks” that can be used in your page to make things happen. What is really helpful is that the book also provides alternatives if you want to support older browsers when possible.

The book starts out with the most fundamental element in HTML5, the doctype definition itself! While this seems trivial, it is actually very important and I learned some new things from reading this very first hack. From there the books goes through a variety of topics, not in any particular order. The next few topics cover more “low level” items like input data types and validation, DOM events, and microformats.

While not technically a “HTML” topic, the book then goes into some of the new CSS3 features, like custom fonts, text manipulations, media queries, and even image sprites. I appreciated this section because some of these new features are part of what makes HTML5 so valuable and having a base knowledge of these hacks comes in handy.

After this we delve into multimedia handling, both for audio and video. I’m rather fond of the mediaelement.js library and was happy to see it referenced in here. There is a good amount of time spent on canvas and SVG. This is important because SVG has really become a first class citizen for most modern web development and it is still new to a lot of folks.

The final sections of the book deal with more advanced topics and libraries. The WebStorage and FileSystem APIs were two things I had looked forward to during the preview for the HTML5 spec and was quite satisfied with the hacks the book provided. There are a few hacks for GeoLocation and the WebWorker as well. The book puts all of this together in the end through the use of Node.js and a few other popular libraries to really demonstrate what you can do with HTML5 without even touching a backend database or server!

HTML5 Hacks is a fabulous book to get started and go deep with what HTML5 provides. Newcomers (such as myself) will be able to get introduced and comfortable with HTML5 quickly. Veterans will have a nice reference guide to work with, and maybe find some new tricks to use themselves.