List of all form objects in HTML
List of objects recognized by all browsers, with the source code, and how to use them.
We will also see how to transmit the form data to different pages or scripts on the server.
The form objecty itself is created by the HTML form tag as detailed in the Introduction to forms:
<form name="myform" id="myform" action="page.html" onSubmit="return fun()">
... objects...
</form>
The name or id attribute can access by script to its content. It is best to use both attributes with the same identifier, for the sake of compatibility.
The action attribute indicates the page to which send the form data. If this attribute is empty, the page that contains the form that will be charged the data as parameters.
The onSubmit attribute associates a test function on the form. If the function return false, the form data are not sent, we stay on the same page.
Forms in HTML 4 may be extended with widgets in JavaScript or CSS designed by the webmaster. Examples:
See also