Lesson 4 of 7
Selecting & changing elements
Selecting & changing elements
The DOM is the browser's live object model of the page. JavaScript can read and change it: document.querySelector('.title').textContent = 'New title'.
This is how pages update without reloading — you select an element and change its content, style, or attributes.
Q&A · 0
Enrol to ask questions and join the discussion.
No questions yet — be the first to ask.