Question
Answer Here
2. How will you select HTML elements using DOM? Name the DOM methods.
Ans: We can select html elements in 4 way using DOM.
They Are:
- getElementById() method.
- getElementsByClassName() method.
- getElementsByTagName() method.
- querySelector() & querySelectorAll() method.