Using the General Sibling Combinator
To style all <span> elements that come after a specific <div> in the DOM (regardless of how many siblings are in between), you can use the general sibling combinator (~). This selects all siblings following the reference element.
Syntax: div ~ span selects all <span> elements that are siblings after a <div>.
Unlike the adjacent sibling combinator (+), ~ selects all following siblings, not just the immediate next element.
Useful when multiple elements need to share the same style after a particular reference element.