• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

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

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
Erik N
Asked:
Erik N
  • 7
  • 2
  • 2
  • +5
1 Solution
 
etromicCommented:
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
 
drew_moffatCommented:
Sorry, no.
0
 
Erik NAuthor Commented:
Right ! It didn't work....

/Thanx !
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
Erik NAuthor Commented:
Adjusted points from 200 to 450
0
 
ozoCommented:
&lt;HEAD&gt; and &lt;/HEAD&gt
or
<pre>
<HEAD> and </HEAD>
</pre>
0
 
knightEknightCommented:
>> 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
 
drew_moffatCommented:
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
 
Erik NAuthor Commented:
To KnightEKnight: No, this is not a bat- or command-generated HTML-code. This is a code generated using a CAM-system..

/Thanx !
0
 
Erik NAuthor Commented:
&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
 
knightEknightCommented:
I guess writing your own browser is out of the question.   ;)
0
 
DKostovCommented:
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
 
ozoCommented:
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
 
CJ_SCommented:
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
 
enkiduCommented:
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
 
Erik NAuthor Commented:
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
 
Erik NAuthor Commented:
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
 
enkiduCommented:
For the <TEXTAREA> tag you do not use the width attribute, instead you use the COLS="number here" attribute.
0
 
Erik NAuthor Commented:
Nice !
Thanx
/Erik
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 7
  • 2
  • 2
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now