Which of the following will select every <p> element that is the only child of its parent?

Which of the following will select every <p> element that is the only child of its parent?
A. :eek:nly-child
B. :eek:nly-of-type
C. :eek:ptional
D. :eek:ut-of-range
 
Answer: a
Explanation: :eek:nly-child selects every <p> element that is the only child of its parent, :eek:nly-of-type selects every <p> element that is the only child of its parent, :eek:ptional selects input elements with no “required” attribute.
 

Tìm kiếm

Back
Top