showing html code on web site

i have tried several ways to post html code onto my web page so people can read the code. Everything I try or have been told to use does nothing and when I load the page to the web site the html code is not shown anywhere????????<!--content-->Use the <PRE> </PRE> element, or just change all of the < and > to &amplt; and &gt;.<br />
<br />
[J]ona<!--content-->You will have to use the second suggestion.... <pre><b>test</b></pre> will equal test<!--content-->Ah yes, that's right. Although, <XMP> is deprecated, it allows you to use HTML code in it. Pyro, do you know what the HTML 4.01 recommendation to replace XMP is?<br />
<br />
[J]ona<!--content-->It would seem like CDATA (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-xml#sec-cdata-sect">http://www.w3.org/TR/REC-xml#sec-cdata-sect</a><!-- m -->) might be it, though I'm not sure.<!--content-->Originally posted by pyro <br />
It would seem like CDATA (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-xml#sec-cdata-sect">http://www.w3.org/TR/REC-xml#sec-cdata-sect</a><!-- m -->) might be it, though I'm not sure. <br />
<br />
No, I don't believe so. That is for XML character data sets. Perhaps <code>? Hmm... I'll look into it.<br />
<br />
[J]ona<!--content-->Yes, CODE (<!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/struct/text.html#edef-CODE">http://www.w3.org/TR/html4/struct/text.html#edef-CODE</a><!-- m -->) is the tag you should use, instead of XMP.<br />
<br />
[J]ona<!--content-->Except for the fact that <code> doesn't work any better than <pre><!--content-->Originally posted by pyro <br />
Except for the fact that <code> doesn't work any better than <pre> <br />
<br />
Ack! You're right! OK, forget it. Just use the second suggestion I originally posted. lol :p<br />
<br />
[J]ona<!--content-->can't you just slap it in a text area?<!--content-->Originally posted by stancreator <br />
can't you just slap it in a text area? <br />
<br />
Yes, but I'd just use &lt; and &gt; for < and > instead--since, it gives you the ability to put it anywhere on your page, and however you want. You can't change color of certain parts of text in a <TEXTAREA>.<br />
<br />
[J]ona<!--content-->
 
Back
Top