title: Select the preceding sibling of an element in CSS using selectors
body: <p>How to select the above element of an element in CSS using selectors</p>
  <pre><code>&lt;li class=&quot;content&quot;&gt;One&lt;/li&gt;
  &lt;li class=&quot;content&quot;&gt;Two&lt;/li&gt;
  &lt;li class=&quot;content&quot;&gt;Three&lt;/li&gt;
  &lt;li class=&quot;no-content&quot;&gt;First&lt;/li&gt;
  &lt;li class=&quot;content&quot;&gt;Four&lt;/li&gt;
  &lt;li class=&quot;content&quot;&gt;Five&lt;/li&gt;
  &lt;li class=&quot;content&quot;&gt;Six&lt;/li&gt;
  </code></pre>
  <p>Here I want to use the class <code>no-content</code>, so that I can get its above element <code>&lt;li class=&quot;content&quot;&gt;Three&lt;/li&gt;</code>,  using CSS selector.</p>