/DOM & Events
Concept Detail
DOM & Events
Difficulty: medium
Overview
The DOM (Document Object Model) represents an HTML document as a tree. Selection: getElementById, querySelector, querySelectorAll. Manipulation: innerHTML, textContent, style, classList. Events fire on user interactions. addEventListener attaches handlers. Events bubble up the DOM by default; capture phase descends. stopPropagation() halts bubbling. Event delegation attaches one handler to a parent to manage many children efficiently.
Practice Linked Questions
easy
Q1. What does `document.getElementById("app")` return if no element with that id exists?
Select one answer before revealing.
medium
Q2. What is event bubbling?
Select one answer before revealing.
medium
Q3. What is event delegation?
Select one answer before revealing.