The adjacent sibling combinator (+
) separates two selectors and matches the second element only if it immediately follows the first element, and both are children of the same parent element
.
/* Paragraphs that come immediately after any image */ img + p { font-weight: bold; }