how do you write html code so the user and see it on a webpage (like a how-to for html)
encode your html entities:
< … <
> … >
& … &
" … "
(' … ' xml, not html. see comments)
you might also want to use
<pre><code>
here comes your preformatted and escaped <html>-code
</code></pre>
to have your code monospaced and preserve whitespaces
You have to use HTML character entities <
and >
in place of the < and > symbols so they aren't interpreted as HTML tags.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With