title: How to select class and tag in css?
body: <p>Is there a way to select an element only if it satisfies both a class <em>and</em> a tag? For example, in the code below, I would like to only select the 2nd line of text:</p>
  
  <pre><code>&lt;div class="foo"&gt;
      &lt;p&gt;Apple&lt;/p&gt;
      &lt;p class="foo"&gt;Banana&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Using the <code>&lt;p&gt;</code> tag will select both lines, and using the <code>.foo</code> class will select both the text and the <code>&lt;div&gt;</code>. Is there a way to define a css rule that combines both? Like "<code>p &amp;&amp; .foo {...}</code>", or something along those lines.</p>