I thought the <code>
tags were supposed to ignore HTML like with BBcode, but that doesn't seem to be the case. Is there a way to achieve this in HTML so I can show code examples? I found a page about <plaintext>
and <xmp>
, but they're apparently deprecated, so what should I use? I've seen <!-- -->
tags for comments, but those are completely hidden from view. I just need something to ignore tags.
In HTML, the only solution guaranteed to work everywhere is to escape the code manually.
<code>
<img src="https://www.google.co.uk/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png">
</code>
<
character with <
>
character with >
<code>
or <pre>
)