Why my html style color not shown


I’m having problem with jupyter-notebook, I’ve a ipynb file in which I’ve a cell with this code:

< span style=“color:red”>SOME TEXT< /span> but i see the text still in black. What am I doing wrong?

This depends on what exactly you type in the cell, and what is your Notebook version. The code as you pasted it in here has two issues:

  • spaces after < (if you meant to avoid conversion to HTML please use backticks to mark it as code isntead)
  • use of curly rather than programmer’s quotation marks

When there is no spurious space and programmers quotation marks are used it renders well in Jupyter Notebook v7.0.3:

Screenshot from 2023-09-10 05-30-47
Screenshot from 2023-09-10 05-30-38


Thank you so much! I solved upgrading de notebook version!

1 Like