View Full Version : Showing HTML code in a web page

09-19-2007, 06:49 PM
How do I display actual HTML code in a web page without it being interpreted by the browser? Kind of like using the code tags here.

09-19-2007, 06:51 PM
Here the forum takes the code posted and changes all < and > to &lt; and &gt; respectively.

09-19-2007, 07:10 PM
Also, to correctly mark up code you would use the <code></code> element, maybe in conjunction with <pre></pre> for preformatted text (thatís what the code tags here do as well) like so:

(put code to display here)

Actual HTML in between those tags still gets parsed as HTML.

09-19-2007, 07:13 PM
Thanks for the fast response! Both of you.