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
- Selecting elementsFind nodes with CSS selectors, understand when you get a static list versus a live collection, and scope a search to one subtree.
- 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.
- 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.