Which selector in jQuery targets all elements with the specified element name?
Correct answer
B. elementName
15 views
B. elementName
15 views
The element selector is written simply as the element name: $("p") selects every <p> on the page.
A leading dot selects by class, a hash selects by ID, and * selects all elements. jQuery selectors follow the same rules as CSS selectors.
Want more practice? Try the full set of Computer Science MCQs on MCQsExam.com.
Not sure why the answer is B? Ask here and get an explanation.