Quiz

JavaScript DOM Quiz

8 questions about working with a page through JavaScript: selecting elements, events, and changing content.

8
questions
~4 min
to complete
instant result
Question 1 of 8
Which method finds the first element matching a CSS selector?
Question 2 of 8
What does document.querySelectorAll(".item") return?
Question 3 of 8
How do you attach a click handler to a button?
Question 4 of 8
What's the difference between innerHTML and textContent?
Question 5 of 8
Which event fires when a select or input value changes and loses focus?
Question 6 of 8
How do you stop a form's default submit behavior?
Question 7 of 8
How do you add a CSS class to an element with JavaScript?
Question 8 of 8
What is event bubbling?
0/8