473,396 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.
Nov 7 '07 #1
5 1568
"Paul" <Pa**@discussions.microsoft.comwrote in message
news:D0**********************************@microsof t.com...
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

Nov 7 '07 #2
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="help">asas</a>
</pre>


"Mark Rae [MVP]" wrote:
"Paul" <Pa**@discussions.microsoft.comwrote in message
news:D0**********************************@microsof t.com...
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

Nov 7 '07 #3
"Paul" <Pa**@discussions.microsoft.comwrote in message
news:1F**********************************@microsof t.com...
>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

Nov 7 '07 #4
This does NOT work
<PRE>
<a href="www.blah.com"Click here to got to blah.com</a>
</PRE>

However This Works
<PRE>
&lt;a href="www.blah.com"&gt; Click here to got to blah.com&lt;/a&gt;
</PRE>
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eM**************@TK2MSFTNGP05.phx.gbl...
"Paul" <Pa**@discussions.microsoft.comwrote in message
news:1F**********************************@microsof t.com...
>>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

Nov 7 '07 #5
"IfThenElse" <sq**********@hotmail.comwrote in message
news:er***************@TK2MSFTNGP05.phx.gbl...
"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:eM**************@TK2MSFTNGP05.phx.gbl...
>"Paul" <Pa**@discussions.microsoft.comwrote in message
news:1F**********************************@microso ft.com...
>>>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
This does NOT work
<PRE>
<a href="www.blah.com"Click here to got to blah.com</a>
</PRE>

However This Works
<PRE>
&lt;a href="www.blah.com"&gt; Click here to got to blah.com&lt;/a&gt;
</PRE>
Yes - I forgot to mention the encoding part - apologies, group...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 7 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Michael Levin | last post by:
I've got the following problem. I'm a biologist and I have a device at work which monitors my frog habitat. The device has a bunch of sensors, and runs an embedded html server with some java...
5
by: Victor | last post by:
Hi I need to open an html file from the file system and embed that html file within my main aspx form. I have 2 questions: 1) How do I open the html file? I tried the File.open(Path, mode) didnt...
6
by: Moist | last post by:
Hi, I have an embedded HTML object as follows (ignore the code tag): <code> <object id="page" data="table.html" type="text/html" .... > </code> I look for the Javascript code (placed in...
10
by: Andrew Poulos | last post by:
While this works on IE 6: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>aiff</title> <meta http-equiv="Content-Type"...
6
by: Christoph Söllner | last post by:
Hi *, is there a html parser available, which could i.e. extract all links from a given text like that: """ <a href="foo.php?param1=test">BAR<img src="none.gif"></a> <a...
18
by: pkassianidis | last post by:
Hello everybody, I am in the process of writing my very first web application in Python, and I need a way to generate dynamic HTML pages with data from a database. I have to say I am...
3
by: SMH | last post by:
Normally an SVG document is loaded/parsed/interpreted inside an HTML document using an 'object' (or 'embed') element, although there are supposedly other ways too. The problem is, the SVG document...
3
by: codemannh | last post by:
I have been trying to figure out the best way to parse some chunks of html code that contain tables. I've been trying to do this with HTML::Parser and HTML::TokeParser and HTML::TokeParser::Simple,...
42
by: Santander | last post by:
how to decode HTML pages encoded like this: http://www.long2consulting.com/seeinaction2008/Simplicity_Beach_table/index.htm Is there script that will do this automatically and generate normal fully...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.