Thursday, March 22, 2012

HTML Code embedded within HTML Page as Text

I know this is a somewhat rudimentary question but...

I want to display HTML code on an HTML page but I want the code to display
as text. In other words, I want the code not to be rendered as HTML on the
HTML page, but rather have it rendered as simple text.

This must be easy to do as I see it everywhere.

TIA."Paul" <Paul@.discussions.microsoft.comwrote in message
news:D092F17D-1B17-4C1C-BCD0-F60B7A640368@.microsoft.com...

Quote:

Originally Posted by

I want to display HTML code on an HTML page but I want the code to display
as text. In other words, I want the code not to be rendered as HTML on the
HTML page, but rather have it rendered as simple text.
>
This must be easy to do as I see it everywhere.


<pre>

</pre>

--
Mark Rae
ASP.NET MVP
http://www.markrae.net
I initially tried this (before the post) and it did not work.

For example the code below showed up as a hyperlink...

<pre>
<a href="http://links.10026.com/?link=help">asas</a>
</pre>

"Mark Rae [MVP]" wrote:

Quote:

Originally Posted by

"Paul" <Paul@.discussions.microsoft.comwrote in message
news:D092F17D-1B17-4C1C-BCD0-F60B7A640368@.microsoft.com...
>

Quote:

Originally Posted by

I want to display HTML code on an HTML page but I want the code to display
as text. In other words, I want the code not to be rendered as HTML on the
HTML page, but rather have it rendered as simple text.

This must be easy to do as I see it everywhere.


>
<pre>
>
</pre>
>
>
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
>
>


"Paul" <Paul@.discussions.microsoft.comwrote in message
news:1FA6E284-FA15-4C39-9616-47785A5F4046@.microsoft.com...

Quote:

Originally Posted by

>I initially tried this (before the post) and it did not work.


Works for me...

You can see an example of it here:
http://www.htmlcodetutorial.com/linepar/_PRE.html
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
This does NOT work
<PRE>
<a href="http://links.10026.com/?link=www.blah.com"Click here to got to blah.com</a>
</PRE>

However This Works
<PRE>
<a href="http://links.10026.com/?link=www.blah.com"> Click here to got to blah.com</a>
</PRE>

"Mark Rae [MVP]" <mark@.markNOSPAMrae.netwrote in message
news:eM80IiVIIHA.3940@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

"Paul" <Paul@.discussions.microsoft.comwrote in message
news:1FA6E284-FA15-4C39-9616-47785A5F4046@.microsoft.com...
>

Quote:

Originally Posted by

>>I initially tried this (before the post) and it did not work.


>
Works for me...
>
You can see an example of it here:
http://www.htmlcodetutorial.com/linepar/_PRE.html
>
>
--
Mark Rae
ASP.NET MVP
http://www.markrae.net


"IfThenElse" <sql_agentman@.hotmail.comwrote in message
news:erYYK%23VIIHA.588@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

"Mark Rae [MVP]" <mark@.markNOSPAMrae.netwrote in message
news:eM80IiVIIHA.3940@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

>"Paul" <Paul@.discussions.microsoft.comwrote in message
>news:1FA6E284-FA15-4C39-9616-47785A5F4046@.microsoft.com...
>>

Quote:

Originally Posted by

>>>I initially tried this (before the post) and it did not work.


>>
>Works for me...
>>
>You can see an example of it here:
>http://www.htmlcodetutorial.com/linepar/_PRE.html


Quote:

Originally Posted by

This does NOT work
<PRE>
<a href="http://links.10026.com/?link=www.blah.com"Click here to got to blah.com</a>
</PRE>
>
However This Works
<PRE>
<a href="http://links.10026.com/?link=www.blah.com"> Click here to got to blah.com</a>
</PRE>
>


Yes - I forgot to mention the encoding part - apologies, group...

--
Mark Rae
ASP.NET MVP
http://www.markrae.net

No comments:

Post a Comment