469,342 Members | 6,793 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

How to display <>

Hi,

I have a query.

All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it?

One method is to use &lt, &gt ,&ltCompany&gt to display '<', '>' and '<Company>' respectively.

But is there any freeware code available which could implement the above functionality without having to use &gt,&lt and such stuff???

Please do respond!!

Thanks
Apr 25 '07 #1
3 3054
for < use &gt;
for > use &lt;

check this site out too

cheer
philleep
Apr 25 '07 #2
KevinADC
4,059 Expert 2GB
for < use &gt;
for > use &lt;

check this site out too

cheer
philleep
Thats exactly what he said in his post. He is looking for a alternate method.
Apr 25 '07 #3
KevinADC
4,059 Expert 2GB
But is there any freeware code available which could implement the above functionality without having to use &gt,&lt and such stuff???
Not that I know of. You could maybe use javascript but I don't know how it would know one < > from another in the html. Or use your text editor to find and replace < > with &lt; and &gt; before uploading the html document.

With a server side script it would be possible but sounds like too much work for such a simple task unless the data is dynamically inserted into your html documents. You could do it with PHP (not that I know how) but once again it sounds like too much work unless the data is dynamic.

Another alternative is to use a textarea tag but that works best for large chunks of html code you want to display as raw text and not individual words imbedded in sentences.
Apr 25 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Donald Firesmith | last post: by
1 post views Thread by JezB | last post: by
3 posts views Thread by Josh Valino | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.