...

View Full Version : Showing HTML code in a web page



ScottInTexas
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.

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

VIPStephan
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:


<pre>
<code>
(put code to display here)
</code>
</pre>


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

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum