CSS Styling of HTML in IPython Notebook output
You could simply use more specific CSS properties! E.g. in a markdown cell (or custom.css with is the default external file for styling the notebook and its content)
<style>
th {
background-color:#55FF33;
}
td {
background-color:#00FFFF;
}
</style>
with the following code
from IPython.display import HTML
table = "<table><tr><th>bar</th><th>bar</th></tr><tr><td>foo</td><td>foo</td></tr></table>"
HTML(table)
gives