Examveda
Examveda

Which of the following selector selects an element if it’s the only child of its parent?

A. :root

B. :nth-oftype(n)

C. :only-child

D. none of the mentioned

Answer: Option C

Solution(By Examveda Team)

Example: h1:only-child {color: blue;}

This Question Belongs to CSS >> CSS Selectors And CSS Files

Join The Discussion

Related Questions on CSS Selectors and CSS Files