Lesson 8 of 55
javascriptThe Document Object Model (DOM)
12 mins
Course progress15%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 8 of 55
javascript12 mins
Keep these ideas in mind as you work through the lesson.
The DOM is a tree‑like representation of the HTML document.
document – entry point.document.querySelector() / querySelectorAll() – CSS selector based retrieval.document.getElementById(), getElementsByClassName(), getElementsByTagName() – legacy methods.const title = document.querySelector('h1');
title.textContent = 'Updated Title';
title.style.color = '#0066cc';