[html5] Validation and <input>

john lists1 at caenim.com
Sat Dec 1 11:49:05 PST 2007


I'm a little confused about the results I am getting from the (X)HTML5  
validator[1]. I have a very basic test page[2] setup like so:

     <!doctype html>
     <head><title>input</title></head>
     <body>
      <fieldset>
       <legend>Search this site</legend>
       <form method="get" action="/search">
        <input name="Search" type="text" value="search">
       </form>
      </fieldset>
     </body>

Which looks valid as far as I can tell from the Web Forms and HTML5  
specs, yet the validator says:

> Error: Bad value “text” for attribute “type” on element “input”.

However, the Web Forms[3] page seems to say that type="text" is an  
acceptable value. Of course, I noticed that the HTML5 specs point you  
(temporarily) to the Web Forms specs for information concerning  
<input>. In fact, every value I've tried in place of "text", such as:  
"email", "date", "number" etc, produces a variation on the same error  
message. So could it be that the validator doesn't realize type="text"  
is valid because it's not in the HTML5 spec yet? Or is it something  
even more obvious that I've missed?

thanks,
john

[1]: http://html5.validator.nu/
[2]: http://preview.tinyurl.com/39q5nj
[3]: http://www.whatwg.org/specs/web-forms/current-work/#existing


More information about the Help mailing list