By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,624 Members | 2,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,624 IT Pros & Developers. It's quick & easy.

Displaying HTML tags in browser

P: n/a
How can I display something like this

<span class="browse">

in a browser without having it interpreted as an html tag.

Is there some other tag to have it treated as text?

Thanks.
Jul 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Tue, 6 Jul 2004 09:47:20 -0700, Sean Berry <se********@cox.net> wrote:
How can I display something like this

<span class="browse">

in a browser without having it interpreted as an html tag.

Is there some other tag to have it treated as text?

Thanks.


Use &name; type entities. http://www.pemberley.com/janeinfo/latin1.html

&lt;span class="browse"&gt;
Jul 20 '05 #2

P: n/a
"Sean Berry" <se********@cox.net> wrote:
How can I display something like this
<span class="browse">
in a browser without having it interpreted as an html tag. Change < to &lt; (and if you want to be symmetrical change & to &gt;).
Is there some other tag to have it treated as text?


Not any more. There was once upon a time and some browser still
support it, but it's been dropped from the spec for a long time.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3

P: n/a
Steve Pugh wrote in
<8v********************************@4ax.com>
"Sean Berry" <se********@cox.net> wrote:
How can I display something like this
<span class="browse">
in a browser without having it interpreted as an html tag.
Change < to &lt; (and if you want to be symmetrical change & to &gt;).


I know it's only a typo, but for them as don't, it should have read:

Change < to &lt; (and if you want to be symmetrical change > to &gt;).

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.
Jul 20 '05 #4

P: n/a
Sean Berry wrote:
How can I display something like this

<span class="browse">

in a browser without having it interpreted as an html tag.


http://www.allmyfaqs.com/faq.pl?Show_HTML_examples
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 20 '05 #5

P: n/a
"PeterMcC" <pe***@mccourt.org.uk> wrote:
Steve Pugh wrote:

Change < to &lt; (and if you want to be symmetrical change & to &gt;).


I know it's only a typo, but for them as don't, it should have read:

Change < to &lt; (and if you want to be symmetrical change > to &gt;).


Whoops, yes. Thanks.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #6

P: n/a
Sean Berry wrote:
How can I display something like this

<span class="browse">

in a browser without having it interpreted as an html tag.

Is there some other tag to have it treated as text?


Not really, no. What you need to do is encode the < and > as &lt; and
&gt; respectively.

--
- Tina Holmboe Greytower Technologies (UK) Ltd.
ti**@greytower.co.uk http://www.greytower.co.uk
[+46] 0708 557 905
Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.