<h3>Adjacent Sibling Selector</h3>
<ol>
  <li id="one"> One </li>
  <li> Two </li>
  <li> Three </li>
  <li> Four </li>
  <li> Five </li>
</ol>

<h3>General Sibling Selector</h3>
<ul>
  <li id="first"> One </li>
  <li> Two </li>
  <li> Three </li>
  <li> Four </li>
  <li> Five </li>
</ul>
#one + li {
  background-color: red;
}

#first ~ li {
  background-color: green;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.