standard for html forms and input fields

liunx

Guest
Hello,<br />
<br />
Is it a standard that one should follow to enclose all html input fields with form tag?<br />
Or can one have input fields outside of form tag?<br />
<br />
thanks,<br />
Alex<!--content-->It depends how you plan on using those input tags.<br />
- If you plan on sending this information to the server script (or another page page using GET), you need to have those input elements within a form.<br />
- If you plan on using them for some sort of client side scripting application, form element is not needed since you can access those input element directly by giving them an ID (or as a child of encapsulating element, such as fieldset or div).<!--content-->thanks Vladdy!<!--content-->I'd say the form is required whether it's used to submit data or not. Some browsers will not render form widgets outside of a form.<!--content-->
 
Back
Top