Patrick H. Lauke wrote:
On Mon, Feb 23, 2009 at 2:10 PM, <michael.brocking...@bt.com> wrote:
Surely the button element is REQUIRED to be enclosed in a <form> ??
Is it though? Just looking at HTML 4.01, I don't think it's
forbidden/invalid to have form elements outside of <form>
http://www.w3.org/TR/html401/interact/forms.html#edef-BUTTON and even
in HTML 5 I don't get the impression they have to
http://www.w3.org/TR/html5/forms.html#the-button-element
(Sorry, genuine question...not trying to be facetious).
P
I don't really know how toread the DTDs properly but the following from
the HTML4 Strict Doctype seems to suggest they need to be inside a form.
<!ELEMENT BUTTON <http://www.w3.org/TR/html401/interact/forms.html#edef-BUTTON>
- -
(%flow; <http://www.w3.org/TR/html401/sgml/dtd.html#flow>)* -(A|%formctrl;
<http://www.w3.org/TR/html401/sgml/dtd.html#formctrl>|FORM|FIELDSET)
-- push button -->
I did some tests anyway to be sure
http://www.sanchothefat.com/dev/sfhelp/validations.php and Michael is
exactly right.
-Rob
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************