Vidyalelo
CSS · Q25

CSS Selectors and CSS Files

Programming · CSS · question 25

Q25

Which of the following selectors selects siblings?

A.
E.class
B.
E ~ F
Answer
C.
*
D.
E, F, G

Answer: Option B

Solution

Answer: Option B
Solution:
Example: p ~ strong {font-style: italic;}
/* sets the font style to italic on all strong tags that have a p tag as a preceding sibling */