Well done!
You have completed Removing Elements and Attributes in HTML and JavaScript Quiz!
Quiz Question 1 of 5
In a scenario where you need to retrieve elements based on a combination of CSS class and HTML tag within a specific div
, which method would you choose?
Choose the correct answer below:
-
A
Use getElementsByTagName()
on the document and manually filter based on class name. -
B
Use getElementsByClassName()
on thediv
and manually filter by tag name. -
C
Use querySelectorAll()
with a combination of tag and class selectors, scoped to thediv
. -
D
Use getElementById()
to select thediv
, then usegetElementsByTagName()
to find the elements.`