HTML5 Programmer’s Reference

Book description

The HTML5 Programmer’s Reference aims to provide everything a programmer needs for understanding and using the new HTML5 family of standards. Previous HTML standards were focused on defining tags for marking up documents. The HTML5 family of standards not only includes new semantic tags but also defines exciting new JavaScript APIs that can be used to build rich, interactive web applications for both mobile and desktop platforms.

The HTML5 Programmer’s Reference focuses on providing real-world non-trivial examples to demonstrate concepts. Chapters include both in-depth discussions and full references for all HTML5 features, as well as extras like how to find the standards, the history of their evolution, and other examples and helpful resources. With this book the reader will learn everything they need to know to build the next generation of web applications.

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. About the Techincal reviewer
  9. Acknowledgments
  10. Introduction
  11. Part I: HTML5 in Depth
    1. Chapter 1: Welcome to HTML5
      1. What Is HTML5?
      2. A Brief History of HTML
        1. Enter Hypertext
        2. Enter Markup Languages
        3. Hypertext Markup Language Is Born
        4. The Browser Wars
        5. Standards to the Rescue
        6. The Continuing Evolution of HTML
        7. The Formation of the WHATWG and the Creation of HTML5
      3. HTML5 Features
        1. New Tags
        2. JavaScript APIs
        3. Related Standards
      4. Summary
    2. Chapter 2: HTML5 Elements
      1. Functionality, Semantics, and the Evolution of HTML
      2. Sections
      3. Grouping
      4. Semantics
      5. Audio and Video Content
        1. Embedded Audio Content
        2. Embedded Video Content
        3. Specifying Multiple Sources
      6. Interactive Elements
        1. Dialogs
        2. Progressive Disclosure
      7. Forms
        1. New Form Elements
        2. New Form Element Attributes
        3. New Input Types
      8. Deprecated Elements and Obsolete Parameters
      9. Summary
    3. Chapter 3: HTML5 APIs
      1. Server-sent Events
        1. Client Setup
        2. Sending Events from the Server
        3. Origin Limitations
        4. Security
        5. An Example Application
      2. WebSockets
        1. Connecting to the Server: Inside the WebSocket Handshake
        2. Receiving Information from the Server
        3. Sending Information to the Server
        4. Closing the Connection
        5. An Example WebSocket Application
      3. Cross Document Messaging/Web Messaging
      4. Web Storage
        1. Methods and Syntax
        2. Privacy and Web Storage
      5. Drag and Drop
        1. The draggable Property
        2. Drag-and-Drop Events
        3. The dataTransfer Object
        4. Drag-and-Drop API Examples
      6. Web Workers
        1. Creating Web Workers
        2. Inside a Web Worker
        3. A Simple Example of a Web Worker
        4. Common Use Cases
      7. Summary
    4. Chapter 4: Canvas
      1. The Canvas Drawing Mode
      2. The Canvas Drawing Context
      3. Basic Drawing Commands
      4. Gradients and Patterns
        1. Gradients
        2. Patterns
      5. Images
      6. SavingCanvas Contents
      7. Text
      8. Shadows
      9. Saving Drawing State
      10. Compositing
      11. Clipping
      12. Transformations
      13. Animation
      14. Interaction
      15. Summary
    5. Chapter 5: Related Standards
      1. Geolocation
        1. Privacy Considerations
        2. Geolocation API
      2. Animation Timing
      3. Selectors
      4. Device Orientation
        1. The compassneedscalibration Event
        2. The deviceorientation Event
        3. The devicemotion Event
      5. WebGL
      6. SVG
      7. Summary
    6. Chapter 6: Practical HTML5
      1. Browser Support
        1. A Crash Course in Feature Detection
        2. Building a Feature Detection Script
        3. Working with Broken or Missing HTML5 Implementations
      2. Example Project: MobiDex, a Mobile Dexterity Puzzle
        1. The Playing Field UI
        2. Generating Obstacles and Targets
      3. Summary
  12. Part II: HTML5 Reference
    1. Chapter 7: HTML5 Element Reference
      1. Sections
        1. The article Element
        2. The aside Element
        3. The footer Element
        4. The header Element
        5. The nav Element
        6. The section Element
      2. Grouping
        1. The figure and figcaption Elements
        2. The main Element
      3. Semantics
        1. The bdi Element
        2. The data Element
        3. The mark Element
        4. The ruby, rp, and rt Elements
        5. The time Element
        6. The wbr Element
      4. Audio and Video Content
        1. The audio Element
        2. The source Element
        3. The track Element
        4. The video Element
      5. Interactive Elements
        1. The details and summary Elements
      6. Form Elements
        1. The datalist Element
        2. The meter Element
        3. The output Element
        4. The progress Element
    2. Chapter 8: HTML5 API Reference
      1. Server-sent Events
      2. WebSockets
      3. Cross-Document Messaging/Web Messaging
      4. Web Storage
      5. Drag and Drop
        1. Specifying Draggable Elements: The draggable Property
        2. Handling the Interactions: Drag-and-Drop Events
        3. Specifying Drop Targets
        4. The dataTransfer Object
      6. Web Workers
    3. Chapter 9: Canvas Reference
      1. The canvas Element
        1. The Drawing Context
        2. Defining Paths
        3. Basic Drawing Commands
        4. Stroking and Filling Paths
        5. Drawing Rectangles
        6. Gradients and Patterns
        7. Images
        8. Text
        9. Shadows
        10. Compositing
        11. Clipping
        12. Transformations
        13. Saving and Restoring Canvas State
    4. Appendix A: JavaScript Tips and Techniques
      1. Code Formatting
      2. JavaScript Rewards Verbosity
      3. Comment Annotations
      4. Using Objects as Event Handlers
      5. Promises
        1. Chaining Promises
        2. Returning Values from Promises
        3. Browser Support for Promises
        4. Further Reading
  13. Index

Product information

  • Title: HTML5 Programmer’s Reference
  • Author(s):
  • Release date: July 2015
  • Publisher(s): Apress
  • ISBN: 9781430263685