liveBook · Manning

What you will learn in HTML5 in Action

by Rob Crowther, Joe Lennon, Ash Blue Greg Wanish

Chapter by chapter

Chapter 1: Chapter 1. HTML5: from documents to applications

This introduction contrasts HTML5’s application-oriented capabilities with earlier document-focused HTML and illustrates its elements and JavaScript APIs with video.

1.1 Exploring the markup: a whirlwind tour of HTML5 · 1.1.1 Creating the basic structure of an HTML5 document · 1.1.2 Using the new semantic elements · 1.1.3 Enhancing accessibility using ARIA roles · 1.1.4 Enabling support in Internet Explorer versions 6 to 8 · 1.1.5 Introducing HTML5’s new form features · 1.1.6 Progress bars, meters, and collapsible content · 1.2 Beyond the markup: additional web standards · 1.2.1 Microdata · 1.2.2 CSS3 · 1.2.3 JavaScript and the DOM · 1.3 The HTML5 DOM APIs · 1.3.1 Canvas · 1.3.2 Audio and video · 1.3.3 Drag and drop · 1.3.4 Cross-document messaging, server-sent events, and WebSockets · 1.3.5 Document editing · 1.3.6 Web storage · 1.3.7 Offline web applications · 1.4 Additional APIs and specifications · 1.4.1 Geolocation API · 1.4.2 Indexed database (IndexedDB API) · 1.4.3 File, File Reader, File Writer, and File System APIs · 1.4.4 Scalable Vector Graphics · 1.4.5 Web Graphics Library · 1.5 Summary

What you learn in chapter 1 →

Chapter 2: Chapter 2. Form creation: input widgets, data binding, and data validation

This introduction outlines how HTML5 form features provide richer input widgets and support client-side validation and styling.

2.1 Previewing the form and gathering prerequisites · 2.1.1 Gathering the application prerequisites · 2.2 Building a form’s user interface · 2.2.1 Defining a form’s basic HTML document structure · 2.2.2 Using the form input types email and tel and the input attributes- s autofocus, required, and placeholder · 2.2.3 Using the form input attribute required · 2.2.4 Building a calculator-style form using the input type number, the- e input attributes min/max and data-*, and the element <output> · 2.2.5 Using the form input type month and input attribute pattern · 2.2.6 Allowing users to choose whether to save or submit a form: using - the input attributes formnovalidate and formaction · 2.3 Calculating totals and displaying form output · 2.3.1 Building calculation functions · 2.3.2 Accessing values from HTML5 data-* attributes · 2.4 Checking form input data with the Constraint Validation API · 2.4.3 Styling invalid elements using CSS3 pseudo-classes · 2.5 Providing fallbacks for unsupported browsers · 2.5.1 Detecting features and loading resources with Modernizr: an overview · 2.6 Summary

What you learn in chapter 2 →

Chapter 3: Chapter 3. File editing and management: rich formatting, file storage, drag and drop

Introduces the Super HTML5 Editor and the desktop-like browser capabilities it brings together.

3.1 The Super HTML5 Editor: application overview, prerequisites, and first steps · 3.1.1 Defining the HTML document structure · 3.1.2 Implementing navigation and state management in JavaScript · 3.2 Rich-text editing and geolocation · 3.2.1 Using designMode to make an HTML document editable · 3.3 Managing files locally: the File System, Quota Management, File, - and File Writer APIs · 3.3.1 Creating an application filesystem · 3.3.2 Getting a list of files from the filesystem · 3.3.3 Loading, viewing, editing, and deleting files · 3.3.4 Creating new files · 3.3.5 Saving files using the File Writer API · 3.4 Adding drag-and-drop interactivity · 3.5 Summary

What you learn in chapter 3 →

Chapter 4: Chapter 4. Messaging: communicating to and from scripts in HTML5

This introduction motivates HTML5 messaging APIs and identifies server-originated and in-browser communication as uses.

4.1 Server-sent events (SSE) · 4.1.1 A simple SSE chat application · 4.1.2 When to use SSE · 4.2 Using WebSockets to build a real-time messaging web app · 4.2.1 Application overview and prerequisites · 4.2.2 Creating a WebSocket with Node.js · 4.2.3 Building the planner application · 4.3 Messaging on the client side · 4.3.1 Communicating across domains with postMessage · 4.3.2 Joining the applications with cross-document messaging · 4.4 Summary

What you learn in chapter 4 →

Chapter 5: Chapter 5. Mobile applications: client storage and offline execution

This introduction explains how local data storage can support offline web application use and improve performance, and identifies the application cache manifest as a way to run a game completely offline.

5.1 My Tasks: application overview, prerequisites, and first steps · 5.1.1 Defining the HTML document structure · 5.1.2 Controlling visibility of views using CSS · 5.1.3 Implementing navigation with JavaScript · 5.2 Managing data with the Web Storage API · 5.2.1 Reading data from localStorage · 5.3 Managing data using IndexedDB · 5.3.1 Detecting database support on a browser · 5.3.3 Developing a dynamic list with HTML and JavaScript · 5.3.6 Updating and deleting data from an IndexedDB database · 5.4 Creating a web application that works offline: using the applicat- tion cache manifest · 5.4.1 Configuring a web server for an application cache manifest’s MIME type · 5.4.2 Creating a cache manifest file · 5.4.3 Automating application updates · 5.5 Summary

What you learn in chapter 5 →

Chapter 6: Chapter 6. 2D Canvas: low-level, 2D graphics rendering

Introduces Canvas as a plug-in-free way to create interactive 2D graphics and contrasts its strengths with SVG.

6.1 Canvas basics · 6.1.2 Generating a Canvas context · 6.2 Creating a Canvas game · 6.2.1 Creating the main engine components · 6.3 Breathing life into Canvas elements · 6.3.1 Animating game elements · 6.3.2 Detecting overlap · 6.3.3 Creating keyboard, mouse, and touch controls · 6.3.4 Control input considerations · 6.4 Polishing Canvas games · 6.4.1 Tracking score and levels · 6.4.2 Adding opening and closing screens · 6.5 Summary

What you learn in chapter 6 →

Chapter 7: Chapter 7. SVG: responsive in-browser graphics

Introduces SVG through its resizable vector graphics, HTML integration, and browser support, contrasting it with bitmap images.

7.2 Starting SVG Aliens with XML · 7.2.1 Setting up SVG inside HTML · 7.2.2 Programming simple shapes and text · 7.2.3 Using XLink and advanced shapes · 7.3 Adding JavaScript for interactivity · 7.3.1 Game engine essentials and using screens · 7.3.3 Creating and organizing complex shapes · 7.3.4 Maintaining a complex SVG group · 7.3.5 SVG vs. Canvas · 7.4 Summary

What you learn in chapter 7 →

Chapter 8: Chapter 8. Video and audio: playing media in the browser

The introduction contrasts HTML5’s in-browser media playback with plug-ins and defines the chapter’s telestrator application.

8.1 Playing video with HTML5 · 8.1.1 Application preview and prerequisites · 8.1.2 Building the basic jukebox framework · 8.1.3 Using the video element to add videos to web pages · 8.2 Controlling videos with the HTMLMediaElement interface · 8.3 Specifying multiple formats with the <source> element · 8.3.1 Discovering which video is playing with .currentSrc · 8.3.2 Converting between media formats · 8.4 Combining user input with video to build a telestrator · 8.4.1 Playing video through the <canvas> element · 8.4.2 Creating custom video playback controls · 8.4.3 Manipulating video as it’s playing · 8.4.4 Building the telestrator features · 8.5 Summary

What you learn in chapter 8 →

Chapter 9: Chapter 9. WebGL: 3D application development

This introduction explains WebGL’s role as a plug-in-free way to build 3D applications and its relationship to Canvas.

9.1 Building a WebGL engine · 9.1.1 Setting up the engine’s layout · 9.1.2 Tools to create, alter, and delete objects · 9.2 Communicating with a graphics card · 9.2.1 Graphics cards: a quick primer · 9.2.2 Creating shaders for 3D data · 9.2.3 Creating buffers for shape, color, and dimension · 9.2.4 Displaying shape data on a screen · 9.3 Putting it all together: creating Geometry Destroyer · 9.3.1 Creating a game interface and control objects · 9.3.2 Creating 2D shapes in 3D · 9.3.3 Creating 3D shapes and particles · 9.4 Summary

What you learn in chapter 9 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.