dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: xhtml validation problem

  1. #1
    Join Date
    Jul 2005
    Posts
    159

    resolved [RESOLVED] xhtml validation problem

    I get this error when trying to validate my webpage:

    document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

    This is the block of code, the error comes back on each input field
    HTML Code:
    <tr>
                                                    <td>
                                                    <form method="post" action="login.php">
                                                    <input type="text" name="username" value='Username' />
                                                    <input type="password" name="password" />
                                                    <input type="submit" value="Login" />
                                                    </form>
                                                    </td>
                                             </tr>
    Do I have to wrap each input tag in <p> or one of the others listed? That seems excessive.
    Last edited by legendx; 12-01-2006 at 03:33 PM.

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    This isn't just an XHTML issue, you'll find the same thing with HTML. Just stick all of the form control elements inside one xhtml:fieldset or xhtml:div or in the case of HTML, FIELDSET or DIV.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    Jul 2005
    Posts
    159

    resolved

    Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles