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 |
|
Geolocation | Ask the user for their physical location |
|
Drag and Drop | Native pick-up-and-drop interactions for elements and files |
|
Canvas | Immediate-mode 2D (and 3D via WebGL) pixel drawing surface |
|
Web Components (Custom Elements, Shadow DOM, | Build reusable, encapsulated custom tags |
|
contenteditable | Make any element directly user-editable |
|
| Attach custom data to elements for JS to read |
|
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 |
Notifications | Show native OS-level notifications from a web page, with user permission |
Fullscreen |
|
Clipboard |
|
File API | Read files the user selects or drops, as text, binary, or a data URL |
History |
|
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
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()
}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."