Types of CSS Combinators
CSS combinators define the relationship between selectors, allowing you to select elements based on hierarchy or sibling relationships.
Descendant combinator (space) – selects all elements that are descendants of a specified element. Example: div p.
Child combinator (>) – selects elements that are direct children of a specified element. Example: div > p.
Adjacent sibling combinator (+) – selects an element that is immediately preceded by a specified sibling. Example: h1 + p.
General sibling combinator (~) – selects all elements that are siblings of a specified element. Example: h1 ~ p.