I'm using Prism and its working well for CSS:
<pre><code class="language-css">p { color: red }</code></pre>
but i can't get it working for html:
<pre><code class="language-html"><p class="red">red text</p></code></pre>
I have 2 problems:
<
and>
are represented as tags, not as text, but i could replace it by<
and>
More important, even replaced as shown in problem 1, the highliter will not highlight any code and everything is just black. Despite that it is working for CSS, whole code looks like this:
<!DOCTYPE html> <html> <head> <link href="prism.css" rel="stylesheet" /> </head> <body> <script src="prism.js"></script> <pre><code class="language-css">p { color: red }</code></pre> </body> </html>
Thanks for any help.