table, etc tags in TEXTAREA

Discussion in 'HTML' started by Ness Mountain, Dec 14, 2004.

  1. Help? I need to display (and allow user to edit) tags such as <table>,
    <tr>, and <td> inside a textarea box. The problem is -- even though they
    show up, and you can edit them, they screw up the formatting of my page.
    It's weird. It does it in various browsers.

    Is there some way to tell the browser they're just there to be edited?

    Thanks for your help.
     
    Ness Mountain, Dec 14, 2004
    #1
    1. Advertising

  2. Ness Mountain

    SpaceGirl Guest

    Ness Mountain wrote:
    > Help? I need to display (and allow user to edit) tags such as <table>,
    > <tr>, and <td> inside a textarea box. The problem is -- even though they
    > show up, and you can edit them, they screw up the formatting of my page.
    > It's weird. It does it in various browsers.
    >
    > Is there some way to tell the browser they're just there to be edited?
    >
    > Thanks for your help.


    You CANNOT put HTML tags *inside* a text area...


    <textarea><h1>hello world</h1><p>hi!</p></textarea>


    ....is totally illegal HTML. You need to find a different way of doing
    it. As the name suggests, a textarea is for TEXT, not HTML tags. One
    caveat; if you want to give the appearance of displaing HTML inside a
    textarea, replace all of your < > with &lt; and &gt;. At least then it
    wont wreck your page...

    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Dec 14, 2004
    #2
    1. Advertising

  3. Ness Mountain

    Guest

    Ness Mountain <> wrote:
    > Help? I need to display (and allow user to edit) tags such as <table>,
    > <tr>, and <td> inside a textarea box. The problem is -- even though they
    > show up, and you can edit them, they screw up the formatting of my page.
    > It's weird. It does it in various browsers.
    >
    > Is there some way to tell the browser they're just there to be edited?
    >
    > Thanks for your help.


    Have you tried escaping the <'s? &gt; &lt; &amp; &quot; etc..

    If you don't it could be a problem if you ever wanted to edit textarea
    tags within a textarea. %-|

    Jamie
    --
    http://www.geniegate.com Custom web programming
    (rot13) User Management Solutions
     
    , Dec 25, 2004
    #3
    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. Chris

    table-tags within div-tags

    Chris, Feb 9, 2004, in forum: HTML
    Replies:
    5
    Views:
    13,328
    Chris
    Feb 10, 2004
  2. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    438
    Fredrik Lundh
    Aug 13, 2008
  3. Augustus
    Replies:
    1
    Views:
    384
    Ken Schaefer
    Sep 10, 2003
  4. Textarea Inside of a textarea

    , Feb 4, 2006, in forum: ASP General
    Replies:
    6
    Views:
    353
    Anthony Jones
    Feb 5, 2006
  5. Replies:
    1
    Views:
    343
    Bart Van der Donck
    Jul 4, 2007
Loading...

Share This Page