Technology Forums: FTA, Satellite, Cable, Home Media, Hardware & Computers
|  Home   |  Forums   |  News   |  Blog   |  

Go Back   Techwatch: Satellite TV forums, FTA, Cable, Hardware, & Tech forums > Online Computing > Web Development


 

Register Members List Search Today's Posts Mark Forums Read

Web Development Web development and programming - C++, PHP, ASP, Javascript, and related issues.

Reply
 
Thread Tools
Old 09-04-06, 02:08 PM   #1 (permalink)
Senior Member
 
Join Date: Jan 2006
Posts: 172
Thanks: 0
Thanked 0 Times in 0 Posts
Default Showing HTML code in webpage

This may be very simple but I have no idea how to do it. I want to show an HTML code in a webpage but I dont want it to get executed. Is there any special tag which can prevent it being executed and just show raw code in the webpage? Any help is appreciated.
__________________
Sufi
sufi is offline   Reply With Quote
Old 09-04-06, 02:35 PM   #2 (permalink)
Member
 
Join Date: Apr 2006
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

well there is.
the <pre> tag.
ur code has to be in between <pre> </pre>
iqbal is offline   Reply With Quote
Old 09-04-06, 03:27 PM   #3 (permalink)
Member
 
Join Date: Apr 2006
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Another way is to insert it into a texbox like the quickreply of this website.
trefer is offline   Reply With Quote
Old 09-04-06, 09:11 PM   #4 (permalink)
Member
 
Join Date: Apr 2006
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Like Trefer said you can put the code in a textbox. That is the best way to go. That is how I do it.
snike is offline   Reply With Quote
Old 09-04-06, 09:41 PM   #5 (permalink)
Member
 
webmonkey's Avatar
 
Join Date: Apr 2006
Location: Tadley, Uk
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to webmonkey Send a message via MSN to webmonkey
Default

From past expierence use a textbox, the pre tags dont seem to work for me! Im annoyed with that but text boxes work just as well.
__________________
X6 Core Tutorials [V1.1]
webmonkey is offline   Reply With Quote
Old 09-04-06, 10:44 PM   #6 (permalink)
Member
 
Arca's Avatar
 
Join Date: Apr 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Replace:

< with &gt;
> with &lt;
Arca is offline   Reply With Quote
Old 09-04-06, 11:22 PM   #7 (permalink)
Member
 
webmonkey's Avatar
 
Join Date: Apr 2006
Location: Tadley, Uk
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to webmonkey Send a message via MSN to webmonkey
Default

Arca, thats a good idea i never thought of that thanks.
__________________
X6 Core Tutorials [V1.1]
webmonkey is offline   Reply With Quote
Old 10-04-06, 10:31 PM   #8 (permalink)
Member
 
Join Date: Apr 2006
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Simply pout the text in a text box and you are done, the best way to do it, it retains the html codes unlike other methods where it can be disturbed
khuldun is offline   Reply With Quote
Reply

Bookmarks

« C# or java | Perl »
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT +1. The time now is 02:55 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.