Google Prettify wasn't displaying HTML properly for me until I found on stackoverflow that I should replace all the <
with <
and all the >
with >
.
Is this really necessary? Is there an easier way to accomplish this?
I want to display simple code like the following:
<h1>Header</h1>
<p>This is a paragraph tag. Here is a <a href="#">LINK</a></p>
Is there something I can use that will detect everything as code between the <pre>
tags? For example, as I type code in at stackoverflow, I'm not required to replace the <
and >
.