I\'m using Prism and its working well for CSS:
p { color: red }
but
Use to style html code.
to style html code.
Also, you only need to escape the beginning of the tags with <, don't worry about the > characters. The easiest way is to paste your html code into the pre tag, then perform a find and replace for all < characters.
<
>
This should work:
<p class="red">red text </p>