I’m trying to make my text appear in code form using
<code>, like this:
<code> <p>This is and example of an element</p> </code>
But when I run the code, I get just the text appearing like code, and not the p tag. So I had to put it like this to work:
<code> <code><</code><code>p</code><code>></code>This is an example of an element<code><</code><code>/</code><code>p</code><code>></code> </code>
I was wondering if there is another way of doing this, or is this the only way? Would I have to do this for longer opening and closing tags too?