‘ ‘ (descendant selector)
div p {
background-color: yellow;
}
> (child selector)
div > p {
background-color: yellow;
}
+ (adjacent sibling selector)
Select an element that is directly after another specific element.
div + p {
background-color: yellow;
}
~ (general sibling selector)
div ~ p {
background-color: yellow;
}
