Well done!
You have completed Removing Elements and Attributes in HTML and JavaScript Quiz!
Quiz Question 1 of 5
What is the most efficient way to select all elements with a particular class name within a specific section of the DOM tree?
Choose the correct answer below:
-
A
Use querySelectorAll()
with the class selector on the entire document and filter by parent element. -
B
Use getElementsByTagName()
on the section element and manually filter by class name. -
C
Use getElementById()
to locate the section, then usegetElementsByClassName()
within that section. -
D
Use querySelector()
to find the first matching element within the section.`