Examveda

Which of the following selectors selects direct descendents?

A. E > F

B. E F

C. E + F

D. E ~ F

Answer: Option A

Solution (By Examveda Team)

Example: body > p {background-color: yellow;}
/* makes all p tags that have the body tag as their immediate parent have the background color yellow */

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

Join The Discussion

Comments (1)

  1. Daniel Toney
    Daniel Toney:
    5 years ago

    What does the following CSS style?

    article:nth-child( 3)

Related Questions on CSS Selectors and CSS Files