Forum Moderators: open

Message Too Old, No Replies

displaying html/code in a web page

         

jackdack

8:20 am on Sep 28, 2005 (gmt 0)

10+ Year Member



I need to display some html in a web page (i.e. as text). How do you display code as text so the browser doesn't read it.

Thanks

BlobFisk

8:58 am on Sep 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are a couple of ways. One is to use a textarea as the characters withing the <textarea> tags does not get parsed.

Another way is to use an HTML Coded Character Set (listed here at the W3C [w3.org]). For example, to display <p> you would use &#60;p&#62;

HTH

jackdack

9:31 am on Sep 28, 2005 (gmt 0)

10+ Year Member



I'll give that a try, thank you