CSS - select th tags only within the tbody of a table
css, css-selectors
Solution
.bgtable tbody th {
color: red;
}
Problem
I would like to use a css selector to get only the th tags with the tbody. There are also th tags in the thead section, which I don't want included by the selector. Here's the markup I'm working with. Is there a selector to accomplish this? ``` <table class="bgtable"> <thead><tr><td width="40%"> </td> <th class="tdplain">Grade 4</th> <th class="tdplain">Grade 8</th> <th class="tdplain">Grade 12</th> </tr> </thead> <tbody><tr><th class="tdplain">Civics (2010)</th> <td class="tdplain">769K</td> <td class="tdplain">577K</td> <td class="tdplain">1179K</td> </tr> </tbody> </table> ```