Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

Which selector targets an element only when it is the last child of its parent?

  1. A :first-child
  2. B :last-child
  3. C :nth-child(1)
  4. D :only-child
Answer

:last-child

:last-child matches the final child element. :only-child matches only when there are no siblings at all.

All Front end Development MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as