HTML5 is a specification (see http://dev.w3.org/html5/spec/) under development by the World Wide Web Consortium (W3C). As we write this book, the HTML5 specification is officially a Working Draft, which means it may go through additional revisions before becoming a recommendation. The recommendation will then go through a formal approval process, resulting in a specific version of the markup language.
Meanwhile, independent from the W3C, the Web Hypertext Application Technology Working Group (WHATWG) also pursues development of the HTML specification (see http://whatwg.org/html).
Notice I didnt mention a version number. Thats because the WHATWG recently decided to change tack and drop versioning entirely. A living standard is now how WHATWG defines HTML (see http://blog.whatwg.org/html-is-the-new-html5). This new development model means that HTML is defined according to how its evolving, not as a version tied to features in a snapshot of time.
Feature Support, Not Browser Versions
What does this mean for us designers and developers? It could lead to a greater focus on implementing individual features, rather than a full specification: no more this is an HTML5 site, but instead this site features web sockets and geolocation.
Then again, some in the industry argue that designers and developers need stable specifications to refer to in order to validate and maintain their sites effectively. Plus, having a stable what is true now version makes authoring and teaching more manageable.
In the end, it could all just be fodder for yet another geek debate (my moneys on Batman over Spider-Man and Peter Davison as the best Doctor), but we mention it mostly as a point of clarification that we have two development models and a reminder of the rather interesting politics involved in the specification processes.
Five Alive
Even though WHATWG sees HTML as a living document that needs no version number, in this book HTML5 is our preferred term. Why is that? For the purposes of your daily design/development life, understanding and implementing features is whats important.
Since the whole point of the Cookbook series is to provide you with practical recipes you can use today, lets talk support for HTML5. Generally speaking, all of todays latest browsers support HTML5 to some degree or another. But, like its predecessors, HTML5 doesnt have that 100% browser support that we sadly suspect well always be dreaming of.
Enter JavaScript
While HTML5 markup has plenty of exciting new features, as youll see in this book, it also involvesmore than ever beforea host of related web technologies, many of which rely on rich JavaScript APIs to expose themselves to your web pages.
In an effort to give you a full taste of what HTML5 and these related technologies have to offer, we will not shy away from the JavaScript details. This book will, at times, take a very heavy JavaScript perspective, as we discuss some of those advanced functionalities that various HTML5 APIs make available to us.
If JavaScript is a scary or unfamiliar topic for you, nows the perfect time to brush up on those skillsif youre serious about using HTML5, youll almost certainly want to get comfortable with leveraging at least some of what JavaScript has to offer.
Its also important to note that many of these APIs are still evolving, even as this book is being written, edited, revised, and published. Some are more complete than others, and thus are likely to be more stable. Other APIs are still in a state of frequent fluctuation, so you should keep that in mind as you decide how you will employ HTML5 technologies in your pages.
Whats in This Book
While we may not provide a full list of all the features of HTML5 and browser support for themdepending on the recipewe do discuss the support for each of the individual elements and implementations covered throughout this book (for tips on finding out what browsers currently support what parts of the specification, see ).
We also cover workarounds to implement when browser support is patchy, and why you may or may not need them. This way, you can decide for yourself if a particular feature works for you, your client, or your employer.
And thats our value to you, dear reader. Using HTML5 isnt an absolute proposition. You dont have to use embedded content or web sockets to use the new structural elements, and vice versa. You dont even have to use the new structural elements to have a valid HTML5 document; you just need the Document Type Definition.
Note
If you find yourself asking whats a Document Type Definition?, start your adventure into HTML5 by checking out !
Pick what works for you and leave the rest. Or, rather, experiment with the rest to see if you may find a practical implementation for yourself or your projects.
Our industry is like HTML in a lot of ways, and probably always will be: its constantly changing.
And we, as the good web designers and developers that we are, have to continue staying on top of those latest changes and developments. We have to continue to educate our clients and employers about the benefits and compromises. We have to experiment with moving targets and constantly grow our skills.
Honestly, though, that all sounds pretty good to us. So, lets start coding some HTML5, shall we?
Audience
While it would probably suffice to say that this book is for any person interested in learning about HTML5, it was particularly designed and developed for web developers who want to transition from XHTML or HTML4 into new technologies.
The chapters toward the end of the book are geared more for developers who want to utilize some of the JavaScript APIs found in HTML5.
Assumptions This Book Makes
You dont want a rundown of the HTML5 specification. Rather, you want to make things work as they relate to your job. In each of this books recipes, the Solution gives you the quick and dirty answer to the problem presented. Check out the Discussion for greater coverage.