JavaScript DOM Manipulation

Check your ability to use DOM APIs to modify web pages.

1. Which method is used to select a DOM element by its 'id' attribute?
2. Which of the following DOM methods return a live HTMLCollection?
3. The textContent property parses HTML tags when setting an element's content.
4. What method is used to create a new DOM element (e.g., a <div>)?
5. Which property modifies the text content of an element without parsing HTML?
6. Which methods add an event listener to a DOM element?
7. querySelectorAll() returns a live NodeList that updates when the DOM changes.
8. What method is used to add a CSS class to an element (modern DOM API)?
9. Which method inserts a new node as the first child of a parent element?
10. Which properties/methods access an element's parent node?
Answered 0 of 0 — 0 correct