code in content of page?
I want to put some code in to my web pages content. I mean i want to display some code in amongst a paragraph of text.
Ive never done it before and searched it in google and found the xmp tag, which works but has caused 8 errors on validation against my strict dtd.
Any ideas how i can do this in a valid way?
<p class="geek"><xmp><geeky rant begins></xmp></p>
This ought to serve the purpose:
A point of reference:
<code>geeky rant here</code>
Between the opening and closing paragraph tags, enter the following code (the example is just that, an example, and should be replaced with your own code):
<code>This is an <img /> tag.</code>
If you want < or > to come out on the page, you have to escape them:
<code><geeky rant begins></code>
Thats great guys. dont know how i never come accross that before.
woo-hoo! "This Page Is Valid XHTML 1.0 Strict!" :)