HTML tags displayed in textbox?

liunx

Guest
Hi everybody!<br />
Im looking for a way to display html tags in a textbox without the form getting confused and thinking it is part of the web page. Thanks! oh and I have to display the <><!--content-->Instead of < use < and instead of > use ><br />
<br />
These codes will make the < and > signs display without the browser treating them as part of the HTML code.<br />
<br />
For more special character codes look here: <!-- m --><a class="postlink" href="http://www.htmlclass.co.uk/chrcodes.html">http://www.htmlclass.co.uk/chrcodes.html</a><!-- m --><!--content-->have you tried it yet? I don't think you need to do anything special to get the html to display in teh textbox. just do it normally. don't quote me on this though. :)<!--content--><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br />
<br />
<html><br />
<head><br />
<title>Untitled</title><br />
</head><br />
<br />
<body><br />
<form name=f1><br />
<textarea cols=32 rows=16><br />
<!--- this is just sample code inside the textarea ---><br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br />
<html><br />
<head><br />
<title>Untitled</title><br />
</head><br />
<body><br />
schtuff<br />
</body><br />
</html><br />
<!--- end sample code ---><br />
</textarea><br />
<br />
<br />
<br />
</body><br />
</html><!--content-->Ok it worked, but my problem wasn't the <> it was the quote marks because it would make the input tag think it was finished at the first quote mark that appeared so I had some perl code replace the quote marks with the character entity & quot; and it worked, thanks for all the help!<!--content-->when all else fails just use xmp which will work anywhere, not just a textarea:<br />
<br />
<span> <br />
<xmp><br />
A little borrowed code:<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <br />
<br />
<html> <br />
<head> <br />
<title>Untitled</title> <br />
</head> <br />
<br />
<body> <br />
<form name=f1> <br />
<textarea cols=32 rows=16> <br />
<!--- this is just sample code inside the textarea ---> <br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <br />
<html> <br />
<head> <br />
<title>Untitled</title> <br />
</head> <br />
<body> <br />
schtuff <br />
</body> <br />
</html> <br />
<!--- end sample code ---> <br />
</textarea> <br />
<br />
<br />
<br />
</body> <br />
</html><br />
</xmp><br />
</span><br />
<br />
You can put that anywhere: in a cell, of p or div, it does not matter everthing between >xmp> and </xmp> is treated as a literal string<br />
<br />
Cd&<!--content-->Cool:cool: <br />
I never knew that :thumbup:<!--content-->
 
Back
Top