← All HTML5 Flashcard Decks

HTML5 Web Storage and APIs Flashcards

6 cards from real HTML5 practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 HTML5 Web Storage and APIs flashcards as text
  1. Which HTML5 API provides access to the device's accelerometer and orientation data?

    Answer: DeviceOrientation API

    The DeviceOrientation API fires events with device orientation and motion data from the gyroscope and accelerometer.

  2. What is the IndexedDB API used for?

    Answer: A low-level API for storing large amounts of structured data client-side

    IndexedDB is a client-side NoSQL database that allows storing large amounts of structured, indexed data in the browser.

  3. Which HTML5 API allows sending and receiving messages between a web page and an embedded iframe from a different origin?

    Answer: Channel Messaging / postMessage API

    The postMessage() method enables safe cross-origin communication between Window objects, such as a page and an iframe.

  4. What is the Clipboard API used for in HTML5?

    Answer: Reading and writing data to the system clipboard asynchronously

    The Clipboard API provides asynchronous methods like readText() and writeText() to interact with the system clipboard.

  5. Which method of the Geolocation API watches for position changes and calls a callback continuously?

    Answer: watchPosition()

    The watchPosition() method registers a callback that is called each time the device's position changes, returning a watch ID to later cancel it.

  6. What does the HTML5 Web Workers postMessage() method do?

    Answer: Sends data between the main thread and a worker thread

    postMessage() is used to communicate data between the main thread and Web Workers, since workers cannot directly access the DOM.