Home »
MCQs »
jQuery MCQs
Which is the correct jQuery selector to select the first HTML element?
20. Which is the correct jQuery selector to select the first HTML element?
- $("element_name.first")
- $("element_name#first")
- $("element_name::first")
- $("element_name:first")
Answer: D) $("element_name:first")
Explanation:
The $("element_name:first") selector is used to select the first HTML element.