Solved

Replacement of < or > in HTML-code....

Posted on 2000-04-14
18
228 Views
Last Modified: 2010-04-09
Is there some other character that have the same function as the < (smaller than) and > (more than) within pure HTML-code ?
A common row is:
<HEAD> and </HEAD>

I need to use some other character instead of the < and >, but I want the browser to use the same interpretation..

Funny question, however I need to know since I will generate my HTML-code from a very different system than the usual ones (ASP, CGI etc)..

Thanx !

/Erik N
0
Comment
Question by:Erik N
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 2
  • 2
  • +5
18 Comments
 

Expert Comment

by:etromic
ID: 2716897
Hmm I know that you can try this... for < you can use: &#60; and for > you can use &#62;

but I'm not 100% that they actually will be written as tags.
0
 

Expert Comment

by:drew_moffat
ID: 2716898
Sorry, no.
0
 

Author Comment

by:Erik N
ID: 2717008
Right ! It didn't work....

/Thanx !
0
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

 

Author Comment

by:Erik N
ID: 2717014
Adjusted points from 200 to 450
0
 
LVL 84

Expert Comment

by:ozo
ID: 2717053
&lt;HEAD&gt; and &lt;/HEAD&gt
or
<pre>
<HEAD> and </HEAD>
</pre>
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 2717083
>> I will generate my HTML-code from a very different system than the usual ones (ASP, CGI etc)..

Indeed!  If by this you mean a batch file (.bat) or NT command file (.cmd) I highly recommend against that as it is a major security hole.  You would basically be giving the whole world a command-prompt to your web server with Administrator permissions.

A klugy alternative would be to use [ and ] and then use another process or filter to convert these to < and > on the fly.
0
 

Expert Comment

by:drew_moffat
ID: 2717126
Sorry Eric,

I had to try that answer...far as I know, those are the tags for html...might wamt to go to <http://www.w3.org> and see if you can find what your looking for.

good luck,

Drew
0
 

Author Comment

by:Erik N
ID: 2717237
To KnightEKnight: No, this is not a bat- or command-generated HTML-code. This is a code generated using a CAM-system..

/Thanx !
0
 

Author Comment

by:Erik N
ID: 2717268
&lt;HEAD&gt; didn't work either. It caused the browser to output the < - character. This is not what I want. I want to find a character that the browser interprets in the same way it does with <, that is: find a character that can be used in HTML-code to indicate to the browser that "this is a html-word", just like with the < - character...


Thanx !
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 2717282
I guess writing your own browser is out of the question.   ;)
0
 
LVL 2

Expert Comment

by:DKostov
ID: 2717463
The only solution is the knightEknight's first one :). Write a cgi that will accept the browser's request, then will parse the source file, change it to HTML and send it back to the browser. If the source file is static, you can convert it before to put it on the Internet. That will be faster.
0
 
LVL 84

Expert Comment

by:ozo
ID: 2717695
There is no other character that the browser interprets in the same way it does with <,
can you explain why you don't want to use <, or what you would do if there was such a character?
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2718676
Indeed, you might want to have a translation table to convert every special case word to normal HTML. A browser only accepts the normal < > signs and doesn't know how to interpret something else. That's a main html file. Another option for you is to use only document.write statements, true, you have to write out the whole HTML code in the document.write( )-function.

A Translation table, like KeK already pointed out, will take a normal document, and see if that document contains any of those translations, if there is, it'll change that word to the html code you want.
0
 
LVL 1

Expert Comment

by:enkidu
ID: 2720760
Well it is quite simple.  What you are asking for is an escape sequence.  These escape sequences allow you to display characteres or symbols that you would not normally have on you keyborad or ones that would be considered a part of the HTML document.

The escape sequences for < and > are &lt; and &gt; respectively.
0
 

Author Comment

by:Erik N
ID: 2723788
Ok enkidu, I already tried this (read ozo:s comment, the 3rd one)....

However, I solved this in another way, but I want to thank you all for trying..

Thanx !

/Erik N
0
 

Author Comment

by:Erik N
ID: 2723824
I have another question though:

I use this to put an editable field on the page:

<CENTER>
<TEXTAREA ROWS=5 Name="Text Area 1" WIDTH="250">
Note:
</TEXTAREA><P>
</CENTER>

However, I doesn't seem to be able to adjust the width of the field, no matter what I write to the width-variable. I tried to set it at 450, but this didn't change anything....

Maybe some of you can give me a gradable answer to this ?

/Erik
0
 
LVL 1

Accepted Solution

by:
enkidu earned 450 total points
ID: 2724893
For the <TEXTAREA> tag you do not use the width attribute, instead you use the COLS="number here" attribute.
0
 

Author Comment

by:Erik N
ID: 2727826
Nice !
Thanx
/Erik
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question