What are these characters? ">&lt"

Discussion in 'HTML' started by colonel, Feb 9, 2005.

  1. colonel

    colonel Guest

    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, Feb 9, 2005
    #1
    1. Advertising

  2. colonel

    Mark Parnell Guest

    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
    Mark Parnell, Feb 9, 2005
    #2
    1. Advertising

  3. colonel

    colonel Guest

    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.
    colonel, Feb 9, 2005
    #3
  4. 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
    Jonathan N. Little, Feb 9, 2005
    #4
  5. colonel

    Oli Filth Guest

    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
    Oli Filth, Feb 10, 2005
    #5
  6. 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
    David Håsäther, Feb 12, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    753
  2. Stefan Mueller
    Replies:
    3
    Views:
    32,957
    Stefan Mueller
    Jul 23, 2006
  3. omegaman
    Replies:
    1
    Views:
    557
    omegaman
    Sep 21, 2004
  4. Victor Bazarov
    Replies:
    0
    Views:
    591
    Victor Bazarov
    Jul 21, 2003
  5. Justin C
    Replies:
    15
    Views:
    370
    Justin C
    Aug 11, 2006
Loading...

Share This Page