It is important to understand that you cannot define selectors within an inline style
attribute. This attribute only accepts style declarations that will be applied to the specific element it belongs to, despite any inheritance rules. For further details on this topic, refer to my response in this post.
In the case of needing to hide empty cells within a table, there is actually a CSS property called empty-cells
specifically designed for this situation:
<table style="empty-cells: hide">
<tr>
<td></td> <!-- Placeholder -->
<td>foo</td>
</tr>
</table>
Although the specification states that this property applies to table cells rather than tables themselves, it can still be set at the table level and inherited by all empty cells within that table.