encode your html objects:
< … <
> … >
& … &
" … "
(' … ' xml, not html. see comments)
you can also use
<pre><code>
here comes your preformatted and escaped <html>-code
</code></pre>
so that your code is monospaced and retains spaces
source
share