HTMLHTML5 APIs Overview

HTML5 APIs Overview

"HTML5" is often used loosely to mean not just new markup elements, but the whole wave of browser JavaScript APIs that shipped alongside them — letting pages do things that used to require plugins like Flash: draw graphics, store data locally, know the user's location, and more. This page is a map of that territory, with links to the dedicated pages on this site where one exists.

APIs Covered in Depth Elsewhere on This Site

API

What it does

Dedicated page

Web Storage

Simple key-value persistence per origin, in the browser

web-storage

Geolocation

Ask the user for their physical location

geolocation

Drag and Drop

Native pick-up-and-drop interactions for elements and files

drag-and-drop

Canvas

Immediate-mode 2D (and 3D via WebGL) pixel drawing surface

canvas-basics

Web Components (Custom Elements, Shadow DOM, <template>, <slot>)

Build reusable, encapsulated custom tags

custom-elements, shadow-dom, template-element, slot-element

contenteditable

Make any element directly user-editable

contenteditable

data-* attributes

Attach custom data to elements for JS to read

data-attributes

Other Notable HTML5-Era APIs

These are not covered as dedicated pages in this HTML section (some belong more naturally under JavaScript or Web APIs topics), but are worth knowing exist:

API

One-line summary

Fetch

Modern, Promise-based replacement for XMLHttpRequest — makes HTTP requests from the browser

Notifications

Show native OS-level notifications from a web page, with user permission

Fullscreen

element.requestFullscreen() — let a page or a single element take over the whole screen

Clipboard

navigator.clipboard.writeText() / .readText() — programmatic copy/paste, permission-gated

File API

Read files the user selects or drops, as text, binary, or a data URL

History

pushState/replaceState — manipulate the browser URL and back/forward stack without a full reload

Web Workers

Run JavaScript on a background thread, off the main UI thread

WebSockets

Persistent, full-duplex connection between browser and server

IndexedDB

A larger, transactional, asynchronous database in the browser (much bigger capacity than Web Storage)

Service Workers

A programmable network proxy running in the background — the basis of offline support and installable PWAs

Web Audio

Low-level, precise audio synthesis and processing in the browser

Battery Status

Read the device battery level and charging state (largely removed from most browsers today over fingerprinting concerns)

A Rough Mental Model
  • Storage & data: Web Storage, IndexedDB, Cache API, File API.

  • Device & environment: Geolocation, Battery Status (mostly retired), Fullscreen, Clipboard.

  • Rendering & graphics: Canvas, WebGL, inline SVG, Web Animations API.

  • Networking: Fetch, WebSockets, Server-Sent Events, Service Workers.

  • UI & interaction: Drag and Drop, contenteditable, Notifications, Web Components.

  • Performance & background work: Web Workers, Service Workers, requestIdleCallback.

Feature Detection Before Feature Use

Browser support varies across these APIs, especially the less common ones. Always check that an API exists before calling it, and provide a fallback or graceful no-op when it doesn't.

feature-detection.js

JS
if ('geolocation' in navigator) {
  navigator.geolocation.getCurrentPosition(onSuccess, onError)
} else {
  console.log('Geolocation not supported — falling back to manual entry')
}

if ('clipboard' in navigator) {
  navigator.clipboard.writeText('Copied!')
}

if ('Notification' in window) {
  Notification.requestPermission()
}
MDN is the authoritative reference
This page is a map, not the full manual — for exact browser support tables, method signatures, and edge cases for any API listed here, MDN Web Docs is the best source of truth.
Why This Matters

Before this generation of APIs, doing any of the above in a browser usually meant reaching for a plugin (Flash, Silverlight, Java applets) or a server round-trip for things that are now instant and local. Together, these APIs are why "HTML5" became shorthand for "the web platform can now do almost anything a native app can."