selectorA + selectorB {
    /* ... */
}
h2 + p {
    background-color: yellowgreen;
}
<article>
    <h2>CSS Next-Sibling Combinator</h2>
    <p>
        Only the target sibling element that
        immediately follows the preceding element is selected.
    </p>
    <p>Subsequent sibling elements are not selected.</p>
</article>
Rendered Output
/* Whitespace before and after the plus sign (+) is optional,
   but recommended for visual clarity. */
   
h2+p { /* Not recommended */
    background-color: yellowgreen;
}
h2 + p { /* Recommended */
    background-color: yellowgreen;
}
selectorA ~ selectorB {
    /* ... */
}
h2 ~ p {
    background-color: yellowgreen;
}
<article>
    <h2>CSS Subsequent-Sibling Combinator</h2>
    <h3>h3</h3>
    <p>
        Selects all target sibling elements that follow the preceding element,
        even if they do not immediately follow it.
    </p>
    <p>
        Selects all target sibling elements that follow the preceding element,
        even if they do not immediately follow it.
    </p>
    <div>
        <p>Target elements that are not sibling elements are not selected.</p>
    </div>
    <p>
        Selects all target sibling elements that follow the preceding element,
        even if they do not immediately follow it.
    </p>
</article>
Rendered Output