Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - What are these characters? ">&lt"

 
Thread Tools Search this Thread
Old 02-09-2005, 09:31 PM   #1
Default What are these characters? ">&lt"


They have shown up in script-generated html code and they are screwing
up my html display. Anyone have any clue as to where I could begin
looking? The script just generates html like this:

echo "<TR><TD>$PROC_1 - $PROC_1_CURRENT instances running</TD><TD>" >>
$BBTMP/$TEST

and somehow these "&gt;&lt" characters are being inserted, or
misunderstood from somewhere...

any advice?

Thanks,

the colonel






colonel
  Reply With Quote
Old 02-09-2005, 10:13 PM   #2
Mark Parnell
 
Posts: n/a
Default Re: What are these characters? "&gt;&lt"

Previously in alt.html, colonel <> said:

> They have shown up in script-generated html code and they are screwing
> up my html display. Anyone have any clue as to where I could begin
> looking? The script just generates html like this:


&gt; is the named character entity reference for the "greater than"
symbol (>).
Likewise &lt; is the "less than" symbol (<).

http://www.w3.org/TR/REC-html40/sgml/entities.html

--
Mark Parnell
http://www.clarkecomputers.com.au
  Reply With Quote
Old 02-09-2005, 10:17 PM   #3
colonel
 
Posts: n/a
Default Re: What are these characters? "&gt;&lt"


On Thu, 10 Feb 2005 09:13:10 +1100, Mark Parnell
<> wrote:

>Previously in alt.html, colonel <> said:
>
>> They have shown up in script-generated html code and they are screwing
>> up my html display. Anyone have any clue as to where I could begin
>> looking? The script just generates html like this:

>
>&gt; is the named character entity reference for the "greater than"
>symbol (>).
>Likewise &lt; is the "less than" symbol (<).
>
>http://www.w3.org/TR/REC-html40/sgml/entities.html



Thanks. That makes sense. Now I just need to figure out why the <
and > are being translated...

Thanks for your help.


  Reply With Quote
Old 02-09-2005, 11:15 PM   #4
Jonathan N. Little
 
Posts: n/a
Default Re: What are these characters? "&gt;&lt"

colonel wrote:
> They have shown up in script-generated html code and they are screwing
> up my html display. Anyone have any clue as to where I could begin
> looking? The script just generates html like this:
>
> echo "<TR><TD>$PROC_1 - $PROC_1_CURRENT instances running</TD><TD>" >>
> $BBTMP/$TEST
>
> and somehow these "&gt;&lt" characters are being inserted, or
> misunderstood from somewhere...
>
> any advice?
>
> Thanks,
>
> the colonel
>
>
>
>

Well the '&gt;' is the HTML entity for 'greater than' character '>'. The
'&lt' would be the 'less than' entity '<' if it had the required
trailing ';' semicolon.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
  Reply With Quote
Old 02-10-2005, 03:44 AM   #5
Oli Filth
 
Posts: n/a
Default Re: What are these characters? "&gt;&lt"

colonel wrote:
> Thanks. That makes sense. Now I just need to figure out why the <
> and > are being translated...
>

Well, whatever program you're using is doing it automatically for you.

It's necessary because otherwise the browser's HTML parser would see a
"<", for instance, and think that that's the start of an HTML tag and
possibly screw up. Writing it as &lt; makes it explicit that you want to
display a "<" symbol to the user. Same logic applies to &gt;, &amp;,
&quot;, and others.

--
Oli
  Reply With Quote
Old 02-12-2005, 07:46 PM   #6
David Håsäther
 
Posts: n/a
Default Re: What are these characters? "&gt;&lt"

Jonathan N. Little <> wrote:

> The '&lt' would be the 'less than' entity '<' if it had the
> required trailing ';' semicolon.


In SGML, a Reference Close (";") is not required to end an entity
reference. Any non name character will also terminate the parsing, as
will the record end character.
In XML though, entity references must end with ";".

--
David Håsäther
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump