HTML DOM

Reading and changing the document from script.

💡
This course has 3 lessons. Start with the first one and use the next / previous links at the bottom of each lesson — the sidebar keeps the whole course in order.

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

Last refreshed 2026-09-17.