title: Change the color of div when user clicks over it
body: <p>I have a few div and when a user clicks on any one of them i wish to change its background color, and i also want that for the first time by default the first div should be active with the colored background</p>
  
  <p>Code that i am using is</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.tabs.active a {
    background: black;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="col-md-2 tabs"&gt;
    &lt;a href="#"&gt;
      &lt;p&gt;First&lt;/p&gt;
    &lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="col-md-2 tabs"&gt;
    &lt;a href="#"&gt;
      &lt;p&gt;Second&lt;/p&gt;
    &lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="col-md-2 tabs"&gt;
    &lt;a href="#"&gt;
      &lt;p&gt;Third&lt;/p&gt;
    &lt;/a&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>but the color is not changing. can anyone please tell me where the code has gone wrong</p>