How do I display html code on a web page?

November 26, 2008 11:36am CST
I'm hoping this will be a dead easy question for someone out there, but I'm no programmer and I'm stuck. I'm trying to display a sample of html code (specifically banner code) in a Squidoo lens that I'm writing, so that people will be able to see how it works (the lens I'm writing is a short explanation of how to make your own banners). The trouble is, when I save the read/write module, the banner code just opens a banner instead of the code itself being displayed (which is what I want). I expect there's a dead simple way round this, but at the moment I'm stuck. Any ideas?
2 responses
• India
26 Nov 08
hmm press ctrl+u in firefox.. ti will show!
1 person likes this
26 Nov 08
I don't have Firefox, but thanks for the advice.
• United States
26 Nov 08
One thing you can do is to enclose your code in PRE and CODE tags, put the CODE inside PRE. You'll have to look up how to open and close HTML tags if you don't know because I can't demonstrate here. Alternately, you can replace all the greater than signs of the tags with > and all the less thans with <l;, which will show up as the symbols but not be interpreted by the browser as HTML source.
1 person likes this
26 Nov 08
Brilliant! I did the second thing you said (replacing the signs) and it worked! Thanks a lot, your blood's worth bottling!