Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<pre> tag not working ...

Status
Not open for further replies.
This seems to be developing a life beyond what I wanted. Using 'textarea' tags works and nobody has come up with a better method.
The requirement is to show html code in a browser page. Whether that page is generated by ASP, PHP or Mrs Fruitcakes own scripting language isn't relevant. Also the link is fictitious.
I'm done.
 
dexeloper said:
This seems to be developing a life beyond what I wanted. Using 'textarea' tags works and nobody has come up with a better method.
The requirement is to show html code in a browser page. Whether that page is generated by ASP, PHP or Mrs Fruitcakes own scripting language isn't relevant. Also the link is fictitious.
I'm done.

[surprise]
[thumbsdown]



--------

GOOGLE is a great resource to find answers to questions like "how do i..."


--------
 
Did you try just putting the appropriate HTML entities in place of the < and > characters as suggested earlier by vacunita?. You can then just stick it in a <p> or anything else - and it validates.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head><meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />

<title>test</title>
</head>
<body>
<h1> first page
</h1>
<p><a href="#">Here</a></p>
</body>
</html>

I notice that you have asked over 50 questions and only found 2 of the answers given to be valuable. If you have only had 2 valuable answers please read faq222-2244 to see how to ask better questions. If you have had other valuable answers, see faq222-2244 to see how to acknowledge them.


If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top