This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12714 - <input /> tag not accepted within a <form> block
Summary: <input /> tag not accepted within a <form> block
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
Depends on:
Reported: 2011-05-20 15:21 UTC by musthave6
Modified: 2011-08-23 20:22 UTC (History)
1 user (show)

See Also:


Description musthave6 2011-05-20 15:21:58 UTC
This HTML Code gives the following error:

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

          <input type="button" name="submit" value="Login" onclick="login();" />

Regarding to W3C's own examples, an <input> tag are place within a <form> block.
The source look like this:

<form id="loginForm" action="#" method="post" style="margin: 0 auto; width: 50%">
      <p><label>User:</label><input type="text" name="username" /></p>
      <p><label>Password:</label><input type="password" name="password"   onkeypress="CheckEnter()" /></p>
    <input type="button" name="submit" value="Login" onclick="login();" />
    <input type="hidden" name="challenge"    value="60e1c4c8e45f25ca4992a6ed2c5622f0795757aecb610fb3f03fe7fab39fcb10df3b47e101d0561a"/>
Comment 1 musthave6 2011-05-20 15:23:30 UTC
Might be related to issue #12706
Comment 2 Etienne Miret 2011-08-23 20:22:22 UTC
The <form> element allows only script and block level elements as children:

However, form controls, including <input> are inline level elements:

Thus, the last two <input> in the HTML code given are invalid.