Skip to main content

User Interaction and the HTML5 APIs

  • Chapter
  • 825 Accesses


Included in the HTML5 specification is documentation on how HTML elements, as well as the wider web browser environment, can be accessed from a programmed script. This is a component of the specification that is interwoven throughout the specification. Each component that can be scripted is broken into application programming interfaces (APIs) that define how the script can interface with specific elements on the page and specific aspects of the web browser. Some of these APIs are included as part of HTML5, such as the History API for manipulating the browser’s forward and back buttons programmatically, while others are part of associated technologies and are covered in separate (but interlinked) specifications to HTML5, such as the geolocation API—which provides web pages with geographic location-aware capabilities. What these APIs are built around is the idea that the page and its environment are represented by a series of objects, such as the geolocation object, which contains location data for the page. In the context of just the page’s content, these objects form the means by which a web page’s Document Object Model (DOM) may be traversed, as discussed in Chapter 1.


  • User Interaction
  • Code Snippet
  • Document Object Model
  • Canvas Area
  • Text Keyword

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

This is a preview of subscription content, access via your institution.

Buying options

USD   6.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   39.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


Rights and permissions

Reprints and Permissions

Copyright information

© 2011 Anselm Bradford and Paul Haine

About this chapter

Cite this chapter

Bradford, A., Haine, P. (2011). User Interaction and the HTML5 APIs. In: HTML5 Mastery: Semantics, Standards, and Styling. Apress.

Download citation