Home » CSS » CSS Attribute Selectors » Question
  1. What will be the output of below mentioned code snippet?
    p strong {background-color: yellow;}
    1. Both p and strong have yellow background
    2. Strong have yellow background
    3. Strong element within a p element have a yellow background
    4. All of above
    5. None of these
Correct Option: C

All occurrences of the strong element within a p element have a yellow background.



Your comments will be displayed only after manual approval.