If you don't know about the new features available in HTML5, now's the time to find out. This book provides practical information about how and why the latest version of this markup language will significantly change the way you develop for the Web.
HTML5 is still evolving, yet browsers such as Safari, Mozilla, Opera, and Chrome already support many of its features -- and mobile browsers are even farther ahead. HTML5: Up & Running carefully guides you though the important changes in this version with lots of hands-on examples, including markup, graphics, and screenshots. You'll learn how to use HTML5 markup to add video, offline capabilities, and more -- and you’ll be able to put that functionality to work right away.
-
Learn new semantic elements, such as <header>, <footer>, and <section>
-
Meet Canvas, a 2D drawing surface you can program with JavaScript
-
Embed video in your web pages without third-party plugins
-
Use Geolocation to let web application visitors share their physical location
-
Take advantage of local storage capacity that goes way beyond cookies
-
Build offline web applications that work after network access is disconnected
-
Learn about several new input types for web forms
-
Create your own custom vocabularies in HTML5 with microdata
About the Author
Mark Pilgrim works as a developer advocate for Google, specializing in open source and open standards. You may remember him from such classics as Greasemonkey Hacks (O'Reilly), Dive Into Python (Apress), and Dive Into Python 3 (APress). He lives in North Carolina with his wife, two boys, and a big slobbery dog.
Table of Contents
Chapter 1 How Did We Get Here?
-
Diving In
-
MIME Types
-
A Long Digression into How Standards Are Made
-
An Unbroken Line
-
A Timeline of HTML Development from 1997 to 2004
-
Everything You Know About XHTML Is Wrong
-
A Competing Vision
-
What Working Group?
-
Back to the W3C
-
Postscript
-
Further Reading
Chapter 2 Detecting HTML5 Features
-
Diving In
-
Detection Techniques
-
Modernizr: An HTML5 Detection Library
-
Canvas
-
Canvas Text
-
Video
-
Video Formats
-
Local Storage
-
Web Workers
-
Offline Web Applications
-
Geolocation
-
Input Types
-
Placeholder Text
-
Form Autofocus
-
Microdata
-
Further Reading
Chapter 3 What Does It All Mean?
-
Diving In
-
The Doctype
-
The Root Element
-
The <head> Element
-
New Semantic Elements in HTML5
-
A Long Digression into How Browsers Handle Unknown Elements
-
Headers
-
Articles
-
Dates and Times
-
Navigation
-
Footers
-
Further Reading
Chapter 4 Let’s Call It a Draw(ing Surface)
-
Diving In
-
Simple Shapes
-
Canvas Coordinates
-
Paths
-
Text
-
Gradients
-
Images
-
What About IE?
-
A Complete Example
-
Further Reading
Chapter 5 Video on the Web
-
Diving In
-
Video Containers
-
Video Codecs
-
Audio Codecs
-
What Works on the Web
-
Licensing Issues with H.264 Video
-
Encoding Ogg Video with Firefogg
-
Batch Encoding Ogg Video with ffmpeg2theora
-
Encoding H.264 Video with HandBrake
-
Batch Encoding H.264 Video with HandBrake
-
Encoding WebM Video with ffmpeg
-
At Last, the Markup
-
What About IE?
-
A Complete Example
-
Further Reading
Chapter 6 You Are Here (And So Is Everybody Else)
-
Diving In
-
The Geolocation API
-
Show Me the Code
-
Handling Errors
-
Choices! I Demand Choices!
-
What About IE?
-
geo.js to the Rescue
-
A Complete Example
-
Further Reading
Chapter 7 The Past, Present, and Future of Local Storage for Web Applications
-
Diving In
-
A Brief History of Local Storage Hacks Before HTML5
-
Introducing HTML5 Storage
-
Using HTML5 Storage
-
HTML5 Storage in Action
-
Beyond Named Key/Value Pairs: Competing Visions
-
Further Reading
Chapter 8 Let’s Take This Offline
-
Diving In
-
The Cache Manifest
-
The Flow of Events
-
The Fine Art of Debugging, a.k.a. “Kill Me! Kill Me Now!”
-
Let’s Build One!
-
Further Reading
Chapter 9 A Form of Madness
-
Diving In
-
Placeholder Text
-
Autofocus Fields
-
Email Addresses
-
Web Addresses
-
Numbers As Spinboxes
-
Numbers As Sliders
-
Date Pickers
-
Search Boxes
-
Color Pickers
-
And One More Thing...
-
Further Reading
Chapter 10 “Distributed,” “Extensibility,” and Other Fancy Words
-
Diving In
-
What Is Microdata?
-
The Microdata Data Model
-
Marking Up People
-
Marking Up Organizations
-
Marking Up Events
-
Marking Up Reviews
-
Further Reading
Appendix The All-in-One Almost-Alphabetical Guide to Detecting Everything
-
List of Elements
-
Further Reading
Colophon