The Definitive Guide to HTML5

Book description

The Definitive Guide to HTML5 provides the breadth of information you'll need to start creating the next generation of HTML5 websites. It covers all the base knowledge required for standards-compliant, semantic, modern website creation. It also covers the full HTML5 ecosystem and the associated APIs that complement the core HTML5 language.

The Definitive Guide to HTML5 begins by tackling the basics of HTML5, ensuring that you know best practices and key uses of all of the important elements, including those new to HTML5. This section also covers extended usage of CSS3, JavaScript, and DOM manipulation, making you proficient in all core aspects of modern website creation.

The final part of the book covers the associated W3C APIs that surround the HTML5 specification. You will achieve a thorough working knowledge of the Geolocation API, web storage, creating offline applications, and the new drag and drop functionality. The Definitive Guide to HTML5 also dives into the key media enhancements of HTML5 and its surrounding technologies: Canvas, video and audio.

What you'll learn

  • How to use all of the core features of HTML5

  • How to make the most of the APIs that surround HTML5, such as Geolocation, Web Storage, and drag and drop

  • How to leverage the media capabilities of the modern web: Canvas, audio, and video

Who this book is for

Web developers and designers who want to increase their HTML5 skills to create modern, standards-compliant websites.

Table of contents

  1. Title
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewers
  7. Acknowledgments
  8. PART I: Getting Started
    1. CHAPTER 1: Putting HTML5 in Context
      1. The History of HTML
      2. Introducing HTML5
      3. The Current State of HTML5
      4. The Structure of This Book
      5. Finding More Information About HTML5
      6. Summary
    2. CHAPTER 2: Getting Ready
      1. Selecting a Browser
      2. Selecting an HTML Editor
      3. Selecting a Web Server
      4. Obtaining Node.js
      5. Getting the Sample Code
      6. Summary
    3. CHAPTER 3: Getting Started with HTML
      1. Using Elements
      2. Using Element Attributes
      3. Creating an HTML Document
      4. Using HTML Entities
      5. The HTML5 Global Attributes
      6. Useful HTML Tools
      7. Summary
    4. CHAPTER 4: Getting Started with CSS
      1. Defining and Applying a Style
      2. Understanding How Styles Cascade and Inherit
      3. Working with CSS Colors
      4. Understanding CSS Lengths
      5. Other CSS Units
      6. Testing for CSS Feature Support
      7. Useful CSS Tools
      8. Summary
    5. CHAPTER 5: Getting Started with JavaScript
      1. Getting Ready to Use JavaScript
      2. Using Statements
      3. Defining and Using Functions
      4. Using Variables and Types
      5. Using JavaScript Operators
      6. Working with Arrays
      7. Handling Errors
      8. Comparing the undefined and null Values
      9. Useful JavaScript Tools
      10. Summary
  9. PART II: The HTML Elements
    1. CHAPTER 6: HTML Elements in Context
      1. Understanding the Sematic/Presentation Divide
      2. Understanding How to Select Elements
      3. Understanding Element Descriptions
      4. Element Quick Reference
      5. Unimplemented Elements
      6. Summary
    2. CHAPTER 7: Creating HTML Documents
      1. Setting Up the Basic Document Structure
      2. Describing Documents with the Metadata Elements
      3. Using the Scripting Elements
      4. Summary
    3. CHAPTER 8: Marking Up Text
      1. Creating Hyperlinks
      2. Annotating Content with the Basic Text Elements
      3. Creating Breaks
      4. Representing Inputs and Outputs
      5. Creating Citations, Quotations, Definitions, and Abbreviations
      6. Working with the Language Elements
      7. Wrapping Up: The Other Text Elements
      8. Summary
    4. CHAPTER 9: Grouping Content
      1. Understanding the Need to Group Content
      2. Creating Paragraphs
      3. Using the div Element
      4. Working with Preformatted Content
      5. Quoting from Other Sources
      6. Adding Thematic Breaks
      7. Grouping Content into Lists
      8. Dealing with Figures
      9. Summary
    5. CHAPTER 10: Creating Sections
      1. Adding Basic Headings
      2. Hiding Subheadings
      3. Creating Sections
      4. Adding Headers and Footers
      5. Adding Navigation Blocks
      6. Working with Articles
      7. Creating Sidebars
      8. Providing Contact Information
      9. Creating a Details Section
      10. Summary
    6. CHAPTER 11: Table Elements
      1. Creating a Basic Table
      2. Adding Headers Cells
      3. Adding Structure to a Table
      4. Creating Irregular Tables
      5. Associating Headers with Cells
      6. Adding a Caption to a Table
      7. Working with Columns
      8. Applying Borders to the table Element
      9. Summary
    7. CHAPTER 12: Working with Forms
      1. Creating a Basic Form
      2. Configuring the Form
      3. Adding Labels to a Form
      4. Automatically Focusing on an input Element
      5. Disabling Individual input Elements
      6. Grouping Form Elements Together
      7. Using the button Element
      8. Working with Elements Outside the Form
      9. Summary
    8. CHAPTER 13: Customizing the Input Element
      1. Using the input Element for Text Input
      2. Using the input Element for Password Input
      3. Using the input Element to Create Buttons
      4. Using the input Element to Restrict Data Entry
      5. Using the input Element to Obtain Search Terms
      6. Using the input Element to Create Hidden Data Items
      7. Using the input Element to Create Image Buttons and Maps
      8. Using the input Element to Upload Files
      9. Summary
    9. CHAPTER 14: Other Form Elements and Input Validation
      1. Using the Other Form Elements
      2. Using Input Validation
      3. Disabling Input Validation
      4. Summary
    10. CHAPTER 15: Embedding Content
      1. Embedding an Image
      2. Embedding Another HTML Document
      3. Embedding Content Using Plugins
      4. Other Uses for the object Element
      5. Embedding Numeric Representations
      6. Other Embedding Elements
      7. Summary
  10. PART III: Cascading Style Sheets
    1. CHAPTER 16: CSS in Context
      1. Understanding CSS Standardization
      2. Understanding the Box Model
      3. Selectors Quick Reference
      4. Properties Quick Reference
      5. Summary
    2. CHAPTER 17: Using the CSS Selectors—Part I
      1. Using the Basic CSS Selectors
      2. Combining Selectors
      3. Using Pseudo-Element Selectors
      4. Summary
    3. CHAPTER 18: Using the CSS Selectors—Part II
      1. Using the Structural Pseudo-Class Selectors
      2. Using the UI Pseudo-Class Selectors
      3. Using the Dynamic Pseudo-Class Selectors
      4. Other Pseudo-Selectors
      5. Summary
    4. CHAPTER 19: Using Borders and Backgrounds
      1. Applying a Border
      2. Setting Element Backgrounds
      3. Creating a Box Shadow
      4. Using Outlines
      5. Summary
    5. CHAPTER 20: Working with the Box Model
      1. Applying Padding to an Element
      2. Appling Margin to an Element
      3. Controlling the Size of an Element
      4. Dealing with Overflowing Content
      5. Controlling Element Visibility
      6. Setting an Element Box Type
      7. Creating Floating Boxes
      8. Summary
    6. CHAPTER 21: Creating Layouts
      1. Positioning Content
      2. Creating Multicolumn Layouts
      3. Creating Flexible Box Layouts
      4. Creating Table Layouts
      5. Summary
    7. CHAPTER 22: Styling Text
      1. Applying Basic Text Styles
      2. Decorating and Transforming Text
      3. Creating Text Shadows
      4. Working with Fonts
      5. Using Web Fonts
      6. Summary
    8. CHAPTER 23: Transitions, Animations, and Transforms
      1. Using Transitions
      2. Using Animations
      3. Using Transforms
      4. Summary
    9. CHAPTER 24: Other CSS Properties and Features
      1. Setting Element Color and Transparency
      2. Styling Tables
      3. Styling Lists
      4. Styling the Cursor
      5. Summary
  11. PART IV: Working with the DOM
    1. CHAPTER 25: The DOM in Context
      1. Understanding the Document Object Model
      2. Understanding DOM Levels and Compliance
      3. The DOM Quick Reference
      4. Summary
    2. CHAPTER 26: Working with the Document Object
      1. Working with Document Metadata
      2. Obtaining HTML Element Objects
      3. Navigating the DOM Tree
      4. Summary
    3. CHAPTER 27: Working with the Window Object
      1. Obtaining a Window Object
      2. Getting Information about the Window
      3. Interacting with the Window
      4. Prompting the User
      5. Getting General Information
      6. Working with the Browser History
      7. Using Cross-Document Messaging
      8. Using Timers
      9. Summary
    4. CHAPTER 28: Working with DOM Elements
      1. Working with Element Objects
      2. Working with Text
      3. Modifying the Model
      4. Summary
    5. CHAPTER 29: Styling DOM Elements
      1. Working with Stylesheets
      2. Working with Element Styles
      3. Working with CSSStyleDeclaration Objects
      4. Working with Computed Styles
      5. Summary
    6. CHAPTER 30: Working with Events
      1. Using Simple Event Handlers
      2. Using the DOM and the Event Object
      3. Working with the HTML Events
      4. Summary
    7. CHAPTER 31: Using the Element-Specific Objects
      1. The Document and Metadata Objects
      2. The Text Elements
      3. The Grouping Elements
      4. The Section Elements
      5. The Table Elements
      6. The Form Elements
      7. The Content Elements
      8. Summary
  12. PART V: Advanced Features
    1. CHAPTER 32: Using Ajax – Part I
      1. Getting Started with Ajax
      2. Using the Ajax Events
      3. Dealing with Errors
      4. Getting and Setting Headers
      5. Making Cross-Origin Ajax Requests
      6. Aborting Requests
      7. Summary
    2. CHAPTER 33: Using Ajax—Part II
      1. Getting Ready to Send Data to the Server
      2. Sending Form Data
      3. Sending Form Data Using a FormData Object
      4. Sending JSON Data
      5. Sending Files
      6. Tracking Upload Progress
      7. Requesting and Processing Different Content Types
      8. Summary
    3. CHAPTER 34: Working with Multimedia
      1. Using the video Element
      2. Using the audio Element
      3. Working with Embedded Media via the DOM
      4. Summary
    4. CHAPTER 35: Using the Canvas Element – Part I
      1. Getting Started with the Canvas Element
      2. Getting a Canvas Context
      3. Drawing Rectangles
      4. Setting the Canvas Drawing State
      5. Saving and Restoring Drawing State
      6. Drawing Images
      7. Summary
    5. CHAPTER 36: Using the Canvas Element – Part II
      1. Drawing Using Paths
      2. Drawing Arcs
      3. Drawing Bezier Curves
      4. Creating a Clipping Region
      5. Drawing Text
      6. Using Effects and Transformations
      7. Summary
    6. CHAPTER 37: Using Drag & Drop
      1. Creating the Source Items
      2. Creating the Drop Zone
      3. Working with the DataTransfer Object
      4. Summary
    7. CHAPTER 38: Using Geolocation
      1. Using Geolocation
      2. Handling Geolocation Errors
      3. Specifying Geolocation Options
      4. Monitoring the Position
      5. Summary
    8. CHAPTER 39: Using Web Storage
      1. Using Local Storage
      2. Using Session Storage
      3. Summary
    9. CHAPTER 40: Creating Offline Web Applications
      1. Defining the Problem
      2. Defining the Manifest
      3. Detecting the Browser State
      4. Working with the Offline Cache
      5. Summary
  13. Index

Product information

  • Title: The Definitive Guide to HTML5
  • Author(s):
  • Release date: December 2011
  • Publisher(s): Apress
  • ISBN: 9781430239604