form_input and W3C Validation? (revised)

I'm checking all the pages on my site via W3C Markup Validation Service to make sure they are all valid HTML 4.01 strict markup.

It appears that the markup generated by form_input is valid, but is flagged with a warning by the W3C validator. [The previous version of this post incorrectly stated that the markup was not valid.] For example, from the CI manual, form_input produces the following:

<input type="text" name="username" id="username" value="johndoe" maxlength="100" size="50" style="width:50%" />

According to the validator:

Quote:The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HMTL 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HMTL 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

Is it correct that form_input produces code which is flagged for a warning by the W3C validator? If so, is it important to fix this in some way?

[eluser]Matthieu Fauveau[/eluser]
Depends on the doctype you use in your page.

[eluser]Colin Williams[/eluser]
It is very clear. CI's helper outputs valid XHTML 1.0. You can copy the form_helper.php to your app's helper folder, and modify it accordingly to pass warning free for HTML 4.0

Okay, thanks for the info.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.