Validation?! ARGH!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • The Plankmeister

    Validation?! ARGH!

    Hi...

    I'm attempting to keep everything I write compliant with xhtml 1.0 strict.
    And It's very bizarre. Why on earth won't this validate:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>Blah blah blah blah</title>
    </head>
    <body>
    <div>
    <form action="admin.p hp" method="post" />
    <p class="descript ion">Blah blah blah....</p>
    Blah blah blah blah blah blah.....
    <select id="selPageType " name="selPageTy pe">
    <option value="article" selected="selec ted">article</option>
    <option value="journal" >journal</option>
    <option value="gallery" >gallery</option>
    </select><br /><br />
    blah blah blah blah <input type="text" name="txtPageNa me"
    id="txtPageName " size="20" maxlength="20" /><br /><br />
    <input class="small" type="submit" value="create page!" />
    <input type="hidden" name="admin_ope ration" value="new_page " />
    </form>
    </div>
    </body>
    </html>


    I'm using this: http://validator.w3.org/ to validate it. And this is the
    error it gives, which is no apparent use at all, as as far as I can see, the
    tag is definitely open:

    Line 24, column 7: end tag for element "form" which is not open
    </form>
    ^

    The problem is that I have a whole bunch of pages which have this layout,
    and need this layout of a form that has layout elements nested inside it...
    Surely this MUST be possible in xhtml? Or is it really so strict that ONLY
    form elements can be placed inside forms? In which case, it's a ridiculous
    standard...

    Hope someone can help!

    Plankmeister.


  • Mad Bad Rabbit

    #2
    Re: Validation?! ARGH!

    "The Plankmeister" <plankmeister_N O_@_SPAM_hotmai l.com> wrote:

    [ why validation error at </form> ? ]
    [color=blue]
    > <form action="admin.p hp" method="post" />[/color]

    Change the /> to >

    [color=blue]
    >;K[/color]

    Comment

    • Bertilo Wennergren

      #3
      Re: Validation?! ARGH!

      The Plankmeister:
      [color=blue]
      > <form action="admin.p hp" method="post" />[/color]
      ^^^[color=blue]
      > [...]
      > </form>[/color]
      [color=blue]
      > I'm using this: http://validator.w3.org/ to validate it. And this is the
      > error it gives, which is no apparent use at all, as as far as I can see, the
      > tag is definitely open:[/color]
      [color=blue]
      > Line 24, column 7: end tag for element "form" which is not open
      > </form>
      > ^[/color]

      It's not open. You closed it when you opened it: "... />". Remove the slash.

      --
      Bertilo Wennergren <bertilow@gmx.n et> <http://www.bertilow.co m>

      Comment

      • The Plankmeister

        #4
        Re: Validation?! ARGH!

        I couldn't see the wood for the trees! Thanks for spotting my stoopid
        mistake :)

        "Mad Bad Rabbit" <madbadrabbit@y ahoo.com> wrote in message
        news:4D-dnSS1S8q778aiRT vUqw@texas.net. ..[color=blue]
        > "The Plankmeister" <plankmeister_N O_@_SPAM_hotmai l.com> wrote:
        >
        > [ why validation error at </form> ? ]
        >[color=green]
        > > <form action="admin.p hp" method="post" />[/color]
        >
        > Change the /> to >
        >
        >[color=green]
        > >;K[/color][/color]


        Comment

        Working...