1
I was using the tag <pre>
and the tag <code>
to insert something that would highlight a piece of code. However, when I write the part of html code in the tags <pre>
and <code>
they recognize (in case the div I’m using).
Follow the code here and in jsfiddle: http://jsfiddle.net/nqmau36p/1/
In HTML:
<pre>
<div class="alert warning">
<b>Ooops!</b> Something glitched.
</div>
</pre>
How it appears on the page:
Ooops! Something glitched.
How I want you to appear:
<div class="alert warning">
<b>Ooops!</b> Something glitched.
</div>
No, there’s no answer in that
– MucaP
It has nothing to do with Javascript
– MucaP
I marked as duplicate of another question that has answers that help you. In the answer I indicated not use Javascript. Exists another also. And with that my answer you can do this: http://jsfiddle.net/nqmau36p/2/
– Sergio
A simple way would be to replace the tags "<" and ">" of HTML by &it’s and >. Example without displaying code: <form id="frmTeste"> Example displaying code: ;&it’sid form="frmTeste">
– mauricio caserta