I am trying to generate html table output for IPython output cells with an external css file. I would like to help understand how to do this, and created a couple of test cases for research. Neither the lowercase, nor the outermost style behaves as I expect -
External, which I hope to do:
htmlstr = "<html><head><link rel='stylesheet' type=\"text/css\" href=\"local.css\"></head><body>TEST BODY</body></html>" HTML(htmlstr)
The file is not readable. I tried different paths and moved the file; but it does not seem to be recognized.
Inner style:
htmlstr = "<html><head><style>body {background-color:yellow;}</style></head><body>TEST BODY</body></html>" HTML(htmlstr)
Doing this in IPython changes the background of IPython itself. These are background changes for yellow for all IPython, and the input cells remain white. This is pretty cool; but, I want the style of a specific output. And again I want to save CSS in an external file. Can someone help me understand the behavior?
IPython is great for providing many features, and it is possible that there is a better way for my need.
source share