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

How to display <>

P: 1
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
Share this Question
Share on Google+
3 Replies


P: 74
for < use &gt;
for > use &lt;

check this site out too

cheer
philleep
Apr 25 '07 #2

KevinADC
Expert 2.5K+
P: 4,059
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
Expert 2.5K+
P: 4,059
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.