Vidyalelo
CSS · Q24

CSS Selectors and CSS Files

Programming · CSS · question 24

Q24

Which of the following selectors selects direct descendents?

A.
E > F
Answer
B.
E F
C.
E + F
D.
E ~ F

Answer: Option A

Solution

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