I’m trying to show some code using prettify and everything goes fine with css, but when I try with html it doesn’t work.
I use pre and code tags, like code blocks in this forum, but I’m missing something.
Can you help? My code in jsFiddle
I tried that way, but still nothing. I don’t think the problem is prettify, cause it doesn’t work either without any classes applied.
What happens is that the html inside pre tags is still considered as html, so if I have for example:
What I get is a div element on my page, when I should be getting just this text: <div><!–html–></div> so prettify could style it properly.
Ah ha! I’m so stupid hahah. The thing that was troubling me was that in the inspector doesn’t appear the < and >, so I thought there was a way to avoid using the entities.
Thanks both of you for your help!