HTML DOM

Reading and changing the document from script.

HTML DOM is taught here in 3 lessons, running from Selecting elements through to Creating, removing and traversing. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.

TrackFront-end Development
Lessons3
LevelBeginner
Reading timeabout 39 minutes
PrerequisitesHelpful, but not required: TypeScript

Lessons

  1. Selecting elementsFind nodes with CSS selectors, understand when you get a static list versus a live collection, and scope a search to one subtree.
  2. Reading and updating content safelytextContent versus innerHTML versus form properties, attribute and class handling, and the script-injection bug that comes with the powerful option.
  3. Creating, removing and traversingBuild nodes and fragments efficiently, detach and replace them correctly, and walk the tree with the element-only navigation properties.

More in Front-end Development

HTML CSS JavaScript TypeScript AJAX JSON Tailwind CSS Bootstrap 5 Foundation Vue.js React Next.js Angular jQuery ECharts Chart.js SVG Font Awesome

FAQ

How long does the HTML DOM course take?
It has 3 lessons, about 39 minutes of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for HTML DOM?
Not strictly. It helps to have read TypeScript first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after HTML DOM?
Continue with AJAX (12 lessons), the next course in Front-end Development.

Last refreshed 2026-09-18.