Last updated 2015 January 14

Forms

Examples

Elements

The elements within a form can be used outside of a form for interaction with the user, where the interaction is implemented with Javascript.

The purpose of the form element is to group form elements as a unit. The form button elements work on the form group as a unit. The general structure using the form element is the following.

<form name="formName"       // Identify the form
           method="POST"           // Preferred encoding for form data for transmission to a processing program
           action="URL for a php or cgi script to process the form data" >

      … The HTML for the contents of the form …

</form>

Form button elements

Form input elements