title: Selectors for divs with specific data attributes
body: <p>I'm trying to use CSS to specifically select divs with specific data attributes. The data attribute I'm using is 'data-id' and selectors I've tried are:</p>
  
  <pre><code>div['data-id'*="2"]
  div[data-id="2"]
  div['data-id'="2"]
  </code></pre>
  
  <p>Nothing works. Can anyone help get the working selector using the 'data-id' attribute to make the 2nd div red? Thanks for any help here.</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>div['data-id'*="2"] {
    color: red;
  }
  div {
    color: blue;
  }
  
  /* also fails:
  div[data-id="2"]
  div['data-id'="2"]
  */</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div data-id='1'&gt;one&lt;/div&gt;
  &lt;div data-id='2'&gt;two&lt;/div&gt;
  &lt;div data-id='3'&gt;three&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>