- From: JOHN HOLLOWAY <jmhollowayii@gmail.com>
- Date: Thu, 1 Apr 2010 08:09:15 -0400
- To: www-validator@w3.org
- Message-ID: <t2s236a37bb1004010509g81f614b2g799e8f73f989929e@mail.gmail.com>
Is it a correct interpretation of the XHTML 1.0 standard (using STRICT
validation) that the input tag can be used outside of a form (<form>) tag? My
question specifically centers around the use of a button input tag (e.g.,
<input type=”button” . . . />) where the intent is that no information is to
be sent to a server. Javascript sets up the “onclick” attribute, and control
stays local on the client (thus there’s no use for a form tag and its
“action” attribute.) The validator seems to endorse such a use – as in,
<div id=’playingBoard’>
<input type=”button” class=”square sqButton” />
. . .
</div>
The CSS class definitions define each input tag as a square and floats it
left to fill its container (the playingBoard.)
The more current browsers (e.g., Firefox 3.6.x) seem to handle the code as I
had expected/hoped; while IE 6.29.x seems to require that the <input> tags
be enclosed within a <form> tag in order to correctly process the code, even
with a DOCTYPE specifying xhtml 1.0 STRICT. My question is this: which
interpretation of the use of the input tag is correct? Only within a form
tag, or is independent of a form tag OK?
I’ve attached a stripped-down version of my XHTML code and the associated
CSS file for your reference.
Thank you for your help.
John Holloway
Attachments
- text/html attachment: fg_stripped.html
- text/css attachment: fg.css
Received on Thursday, 1 April 2010 13:44:31 UTC