467,915 Members | 1,223 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

Displaying HTML tags in browser

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
  • viewed: 5588
Share:
6 Replies
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
"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
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
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
"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
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.

Similar topics

3 posts views Thread by Jens Kristensen | last post: by
1 post views Thread by Yoshitha | last post: by
9 posts views Thread by Eric Lindsay | last post: by
15 posts views Thread by mleaver | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.