Home »
MCQs »
jQuery MCQs
Which is the correct jQuery selector to select the first list item of every <ul> element?
23. Which is the correct jQuery selector to select the first list item of every <ul> element?
- $("ul li:first-child")
- $("ul li:first.*")
- $("li:first-child")
- $("ul:first-child")
Answer: A) $("ul li:first-child")
Explanation:
The $("ul li:first-child") selector is used to select the first list item of every <ul> element.