I am attempting to style the html table output for an IPython output cell with an external css file. I would like help understanding how to do this and have created a couple of test cases for exploration. Neither inline or external styling behave as I expect -
External which I am hoping to do:
htmlstr = "<html><head><link rel='stylesheet' type=\"text/css\" href=\"local.css\"></head><body>TEST BODY</body></html>"
HTML(htmlstr)
The file does not seem to be read. I have tried different paths and moving the file around; but, it does not seem to be recognized.
Internal Styling:
htmlstr = "<html><head><style>body {background-color:yellow;}</style></head><body>TEST BODY</body></html>"
HTML(htmlstr)
Execution of this in IPython changes the background of IPython itself. That is the background changes to yellow for all of IPython and the input cells remain white. Which is pretty cool; but, I want to style the specific output. And again, I want to store the CSS in an external file. Can someone help me understand the behaviour?
IPython is great about providing many possibilities and it is possible that there is a better path for my need.

cssfile?