HTML5 Book
HTML5.array.org is designed to be the companion web site for my new HTML5 book, published by John Wiley & Sons (2011).
In the table of contents below, you will find a downloadable sample chapter PDF, as well as links to some of the site-specific examples found in the book.
Naturally, since HTML5 will not be "finalized" until 2014, this book can give you a snapshot of what HTML5 is, when it was published. Therefore, I will endeavor to keep HTML5.array.org updated with as many HTML5 updates that I can, as well as any errata found within the book itself.
All code examples in the book can be found on Github.
--
Adam McDaniel
Description (from Wiley.com)
Use the latest version of HTML to create dynamic Web pages
HTML5 is the latest iteration of the standard markup language for creating Web pages. It boasts extensive updates from its predecessor and allows you to incorporate rich media content into a site without any dependence on extra software such as Flash. Packed with hundreds of screen shots, this visual guide introduces you to the many new features and abilities of HTML5 and shows you the many exciting new possibilities that exist for designing dynamic Web pages.
- Offers visual learners a solid reference on HTML5, the latest version of the standard markup language for designing Web pages
- Demonstrates how to use HTML5 to create Web pages that feature the latest in rich media content
- Provides easy-to-understand examples that cover a variety of topics to get you up and running with HTML5
- Features a companion Web site that contains all the code needed to learn HTML5
- HTML5: Your visual blueprint for designing effective Web pages opens your eyes to the world of possibilities that exist with the new version of the popular markup language.
Table of Contents
- Introducing HTML5 (Sample Chapter PDF)
- Introducing HTML5 2
- Understanding HTML5 Web Browsers 6
- Understanding Backward Compatibility 8
- Understanding the History of Markup Languages 10
- Introducing the New and Changed HTML5 Tags and Attributes 12
- Understanding Obsolete HTML Tags and Attributes 16
- Validate a Website for HTML5 Compliance 18
- Validate a Web Browser for HTML5 Support 20
- Support HTML5 in Internet Explorer with a Plug-in 22
- Getting Started with HTML5 Page Layout
- Create an HTML5 Web Page 24
- Understanding the Semantic Layout in HTML5 26
- Declare Header and Footer Layout Elements 30
- Declare a Navigation Layout Element 32
- Declare Section and Article Layout Elements 34
- Declare Heading and Paragraph Layout Elements 36
- Declare Figure and Aside Layout Elements 38
- Assign CSS Styles to Layout Elements 40
- Provide a Fallback for Outdated Web Browsers 42
- Announce HTML5 Support 44
- Resize Your Website for Mobile Web Browsers 46
- Using New HTML5 User Interface Tags and Attributes
- Display a Fixed-Meter Bar (Demonstration) 48
- Display a Moving Progress Meter (Demonstration) 50
- Add a Caption to a Figure (Demonstration) 52
- Highlight Text (Demonstration) 54
- Specify Safe Line Breaks in Long Words (Demonstration) 55
- Allow the User to Edit Content (Demonstration) 56
- Spell-Check User Content (Demonstration) 57
- Declare an Interactive Summary and Details Layout Element (Demonstration) 58
- Styling with CSS3
- Introducing CSS3 60
- Validate a Web Browser for CSS3 Support 62
- Select an HTML Element Using Its Class or ID 64
- Select an HTML Element Using an Attribute 65
- Select an HTML Element Using a Specific Attribute Value 66
- Select an HTML Element Using a Partial Attribute Value (Demonstration) 68
- Select an HTML Element Using the Structural type Pseudo-Class (Demonstration) 70
- Select an HTML Element Using the Structural child Pseudo-Class (Demonstration) 72
- Select an HTML Element by Its Sibling Element (Demonstration) 74
- Select HTML Elements Using a Negating Pseudo-Class (Demonstration) 76
- Select HTML Elements by User Selection (Demonstration) 77
- Change an Element's Background Image (Demonstration) 78
- Customize an Element's Font (Demonstration) 80
- Format Text Overflow inside an Element (Demonstration) 82
- Enhancing Your Web Page Visually with CSS3
- Round Border Corners (Demonstration) 84
- Add a Shadow Effect (Demonstration) 86
- Change an Element's Opacity (Demonstration) 88
- Apply an Image As an Element Border (Demonstration) 90
- Customize a Scroll Bar with Images (Demonstration) 92
- Apply a Color Gradient (Demonstration) 96
- Transform Object Dimensions (Demonstration) 98
- Transition between Styles (Demonstration) 100
- Create Simple Animations (Demonstration) 102
- Creating Boxes and Columns with CSS3
- Introducing the Flexible Box Model 106
- Create a Horizontal Flexible Box Model 108
- Create a Vertical Flexible Box Model 110
- Stretch and Shrink Objects in a Flexible Box 112
- Horizontally Pack Objects within a Flexible Box 114
- Vertically Align Objects within a Flexible Box 115
- Reorder Objects in a Flexible Box (Demonstration) 116
- Introducing Multi-Column Layouts 118
- Create a Multi-Column Layout 120
- Add a Ruler and Gap in between Columns 122
- Span Objects Horizontally across Columns (Demonstration) 124
- Creating HTML5 Form Inputs
- Create a Number Input Type (Demonstration) 126
- Create a Telephone Input Type (Demonstration) 127
- Create an Email Input Type (Demonstration) 128
- Create a URL Input Type (Demonstration) 129
- Create a Search Input Type (Demonstration) 130
- Require a Value in an Input Field (Demonstration) 131
- Set a Placeholder for an Input Field (Demonstration) 132
- Auto-Focus on an Input Field (Demonstration) 133
- Disable Auto-Completion of Input Text (Demonstration) 134
- Using Speech Input (Demonstration) 135
- Create a Drop-Down List for Text Input Suggestions (Demonstration) 136
- Restrict Input Values Using Pattern Matching (Demonstration) 138
- Create a Date Input Type (Demonstration) 140
- Create a Range Input Type (Demonstration) 142
- Create a Color Input Type (Demonstration) 144
- Link an Input Field to a Specific Form (Demonstration) 146
- Using jQuery with HTML5
- Introducing jQuery 148
- Download jQuery 150
- Load jQuery 151
- Execute jQuery Methods on Elements (Demonstration) 152
- Manipulate HTML Elements via the DOM (Demonstration) 154
- Customize Browser Events with jQuery (Demonstration) 156
- Hide and Show Content with jQuery (Demonstration) 158
- Add and Remove CSS Classes on Elements with jQuery (Demonstration) 160
- Send Custom HTML Attribute Data into jQuery (Demonstration) 162
- Using Scrolling Transitions with jQuery (Demonstration) 164
- Inspecting and Debugging Your Website
- Launch the Chrome Inspector 166
- Examine Elements' Structure and Layout 168
- Modify HTML and CSS Code in Real Time 170
- Examine JavaScript Code 172
- Add a JavaScript Breakpoint 174
- Step through JavaScript Code 176
- Add a Watch Expression 178
- Drawing with the HTML5 Canvas
- Introducing the HTML5 Canvas 180
- Declare a canvas Element (Demonstration) 186
- Draw Basic Rectangles on the Canvas (Demonstration) 188
- Draw Paths on the Canvas (Demonstration) 190
- Draw Text on the Canvas (Demonstration) 192
- Using Solid Color on the Canvas (Demonstration) 194
- Using Linear Gradient Colors on the Canvas (Demonstration) 196
- Using Radial Gradient Colors on the Canvas (Demonstration) 198
- Draw an Image on the Canvas (Demonstration) 200
- Scale a Canvas Image (Demonstration) 202
- Crop a Canvas Image (Demonstration) 203
- Query Individual Canvas Pixels (Demonstration) 204
- Track Mouse Activity on the Canvas (Demonstration) 206
- Translate the X- and Y-Axes (Demonstration) 210
- Rotate the X- and Y-Axes (Demonstration) 212
- Create Animations on the Canvas (Demonstration) 214
- Adding HTML5 Multimedia
- Introducing HTML5 Audio and Video 218
- Understanding Audio and Video Formats 220
- Install a Movie Encoder 222
- Reencode Movies with the Miro Video Converter 224
- Play Movies with the HTML5 video Element (Demonstration) 226
- Play Sound with the HTML5 audio Element (Demonstration) 228
- Control Audio and Video Playback with JavaScript (Demonstration) 230
- Embed a Movie Player with VideoJS (Demonstration) 232
- Using Drag and Drop in HTML5 (Chapter-specific demonstration)
- Introducing Drag and Drop in HTML5 234
- Specify Objects to Drag 238
- Specify a Drop Zone 240
- Handle the Drag-and-Drop Events 242
- Visually Enhance the Drag-and-Drop Experience 248
- Storing Data Using a Client-Side Database
- Introducing Client-Side Storage in HTML5 250
- Store Data Using the Web Storage API (Demonstration) 252
- Retrieve Data from the Web Storage API (Demonstration) 254
- Using the Correct IndexedDB API (Demonstration) 256
- Open an IndexedDB Database (Demonstration) 257
- Create a New IndexedDB Object Store (Demonstration) 258
- Store an Object Using the IndexedDB API (Demonstration) 260
- Retrieve Objects Using the IndexedDB API (Demonstration) 262
- Delete an Object Using the IndexedDB API (Demonstration) 264
- Delete an IndexedDB Object Store (Demonstration) 265
- Providing Offline Access to Web Applications
- Identify Whether the Browser Is Online 266
- Identify Whether the Network Is Online 268
- Listen for Online and Offline Events (Demonstration) 272
- Introducing the Application Cache 274
- Create an Application Cache Manifest 276
- Update the Application Cache (Demonstration) 278
- Create a "Website Offline" Fallback Page (Demonstration) 280
- Using Geolocation
- Display a Specific Location with Google Maps (Demonstration) 282
- Understanding Geolocation and GPS Services 284
- Request the User's Current Location (Demonstration) 286
- Display the User's Current Location with Google Maps (Demonstration) 288
- Running Secondary JavaScript Threads Using Web Workers
- Introducing Web Workers 290
- Create a Web Worker JavaScript File 294
- Link a Web Worker to Your Web Application 296
- Launch a Web Worker Event from Your Web Application (Demonstration) 298
- Falling Back for Non–Web Worker Browsers 300
- Communicating with WebSockets
- Introducing WebSockets 302
- Create a WebSocket Client 304
- Send WebSocket Messages 306
- Display WebSocket Messages 308
- Interact with a WebSocket Service (Demonstration) 310
- Displaying Desktop Notifications
- Introducing Desktop Notifications for Chrome 312
- Request User Permission to Display Desktop Notifications (Demonstration) 316
- Launch a Desktop Notification Message (Demonstration) 318
- Customize the Desktop Notification UI 320
- Listen for Desktop Notification Events 322
- HTML5 Reference
- HTML5 Reference 324
- HTML Global Attributes 327
- HTML Metadata Tags 330
- HTML Sectioning Tags 336
- HTML Grouping Tags 339
- HTML Phrasing Tags 342
- HTML Embedding Tags 349
- HTML Table Tags 355
- HTML Form Tags 358


