HTML5: The Missing Manual (Missing Manuals)
Format: PDF / Kindle (mobi) / ePub
HTML5 is more than a markup language—it's a dozen independent web standards all rolled into one. Until now, all it's been missing is a manual. With this thorough, jargon-free guide, you'll learn how to build web apps that include video tools, dynamic drawings, geolocation, offline web apps, drag-and-drop, and many other features. HTML5 is the future of the Web, and with this book you'll reach it quickly.
The important stuff you need to know:
* Structure web pages in a new way. Learn how HTML5 helps make web design tools and search engines work smarter.
* Add audio and video without plugins. Build playback pages that work in every browser.
* Draw with Canvas. Create shapes, pictures, text, and animation—and make them interactive.
* Go a long way with style. Use CSS3 and HTML5 to jazz up your pages and adapt them for mobile devices.
* Build web apps with rich desktop features. Let users work with your app offline, and process user-selected files in the browser.
* Create location-aware apps. Write geolocation applications directly in the browser.
incorporating YouTube windows, ads, and Google search boxes in a web page. A few more elements were kicked out because they were redundant or the cause of common mistakes, including (use instead) and
supports video, but there are subtle video bugs hiding in older versions of the Safari browser. For example, if you set the poster attribute (page 149), you may find that the video becomes unplayable. Mobile browsers have their own quirks. Some don’t support features like autoplay and looping, because these features can drain batteries and use up valuable bandwidth. But even if you don’t plan to use these features, mobile devices need special consideration to ensure good video playback
interesting, several slightly different boing sounds are used. This is a stand-in for a more realistic game, which would probably incorporate a dozen or more sounds. There are several ways to implement this design, but not all of them are practical. The first option is to add a single new
support.) TIP You can learn more about the WebVTT standard—including the techniques you need to format and style captions—from the specification at http://dev.w3.org/html5/webvtt. If you’d like some help writing your captions, you can try out Microsoft’s nifty Caption Maker page (Figure 5-10), which you can find at http://tinyurl.com/capmaker. Chapter 5: Audio and Video 171 The kind attribute describes the type of content in your captions. The HTML5 specification gives you five choices,
information and act on it. The label attribute sets the text that’s shown in the video player’s Caption menu, which you can call up by clicking a small button under the video window. The label text is particularly important if you want to let viewers choose from multiple tracks. For example, here’s a video that has two tracks: