Skip to content

The DOM and Browser APIs

How JavaScript interacts with the page. DOM traversal, manipulation, event handling, and the essential browser APIs every frontend developer must know.

1
The DOM Tree
beginner

How browsers turn raw HTML into a living tree of objects you can manipulate — nodes, elements, the document object, and why the DOM is not your HTML.

12 min read
2
Selecting and Traversing Elements
beginner

querySelector, getElementById, DOM traversal — how to find any element on the page and navigate the tree like you own it.

14 min read
3
Creating and Modifying Elements
beginner

createElement, DocumentFragment, innerHTML vs textContent, classList, dataset — everything you need to build and change the DOM programmatically.

15 min read
4
Event Handling and Delegation
beginner

addEventListener, bubbling vs capturing, event delegation, stopPropagation, preventDefault — the event system that powers every interactive feature on the web.

16 min read
5
Forms and Form Validation API
beginner

FormData, the Constraint Validation API, custom validity, input events — how to handle forms properly without reinventing what the browser already gives you.

14 min read
6
localStorage and sessionStorage
beginner

The Web Storage API — when to use localStorage vs sessionStorage, storage events, JSON serialization, size limits, and when to reach for cookies or IndexedDB instead.

12 min read
7
Fetch API and HTTP Requests
beginner

fetch(), Request/Response objects, headers, AbortController, error handling — the modern way to talk to servers from JavaScript.

15 min read
8
Timers and Intervals
beginner

setTimeout, setInterval, requestAnimationFrame, requestIdleCallback — how JavaScript schedules work in the future, and why 0ms doesn't mean instant.

13 min read
9
IntersectionObserver and ResizeObserver
beginner

IntersectionObserver for lazy loading and infinite scroll, ResizeObserver for responsive components, MutationObserver for DOM changes — the observer APIs that replaced scroll/resize event listeners.

14 min read
10
History API and Routing Basics
beginner

pushState, replaceState, popstate events, URL and URLSearchParams — how SPA routers work under the hood and why the back button is harder than you think.

13 min read
11
Quiz: DOM and Browser API Return Values
beginner

10 questions testing what DOM methods actually return, how events behave, storage quirks, and fetch gotchas. Know the APIs, not just the tutorials.

8 min read