Home »
MCQs »
jQuery MCQs
Which is the correct jQuery selector to select the first <div> of the HTML document?
21. Which is the correct jQuery selector to select the first <div> of the HTML document?
- $("div.first")
- $("div#first")
- $("div::first")
- $("div:first")
Answer: D) $("div:first")
Explanation:
The $("div:first") selector is used to select the first <div> of the HTML document.