title: Can HTML tags inherit the class of a parent/enclosing tag?
body: <p>Is there a way to specifically style only the tags inside a wrapping tag? For example, I want to style only <code>&lt;td&gt;</code> within tables of class "wide".</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;table class="wide"&gt;
  &lt;tr&gt;
  &lt;td&gt;Entry 1&lt;/td&gt;
  &lt;td&gt;Entry 2&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  ...
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>CSS (or something along these lines):</p>
  
  <pre><code>td.wide {
      /* styling */
  }
  </code></pre>
  
  <p>I want to have all the <code>&lt;td&gt;</code> elements for "wide" tables styled but a table like <code>&lt;table class="small"&gt; ... &lt;/table&gt;</code> would not have its <code>&lt;td&gt;</code> elements styled. I would like to avoid adding <code>class="wide"</code> to every <code>&lt;td&gt;</code> element in all the wide tables.</p>
  
  <p>Note: I'm not looking to do this specifically for <code>&lt;table&gt;</code> and <code>&lt;td&gt;</code> elements. I'd like to know the proper way to do this in general. The example could be styling all <code>&lt;p&gt;</code> elements enclosed in a <code>&lt;div&gt;</code> of a certain class.</p>