Results 1 to 2 of 2

Thread: Odd can't use "<" in table

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2008
    Posts
    407

    Odd can't use "<" in table

    Hi Guys,
    I was coding something today and I found this strange thing.
    If you try and put the less than "<" into a table cell it won't let you. You need to replace it with "&lt;" but the ">" works just fine.

    Example:
    try and put this into a table cell "blah1<blah2" it will give you "blah1"
    To get "blah1<blah2" you need to put "blah1&lt;blah2"

    There's no problem doing this in a textbox, I didn't try a label but I belive it would work.

    Anyone understand this? I know that &lt; is the "<" but why can't you just use "<"?
    My Websites
    SharpMP3 - MP3 Design Articles www.sharpmp3.com
    Yobbers - Job Search www.yobbers.com
    Lets Trend - Methods For Riding Stock Trends www.letstrend.com

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Odd can't use "<" in table

    The problem with doing this, is that you really shouldn't do this!

    At the end of the day, the HTML standard uses both the < and > to define the elements within the standard. If you use a < or a > enywhere else in your code, you run the risk of breaking the elements of your HTML page.

    If you need to output a < or a > within an HTML element on your page, then you should use the &lt; or &gt;

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width