Creates a container element for controls.
The form element allows users to submit data to a server. The target URL can be specified with the action attribute. The method attribute defines the way of sending.
The contents of the message submitted to the server depend on the named form controls in the form tag. Named control means an element with a non-empty name attribute.
Only the contents or the state of the named form controls will be sent.
The following elements are form controls:
Push buttons (button, input:button, input:reset, input:submit) don't play an important part in the message. If a push button is named and it is in pushed state when the form is submitted, then the name and the value (the value of the value attribute) of the button will be sent with the form. If a push button is not in pushed state, no information is sent with the form that belongs to the button. Since only one push button can be in pushed state at any time, they don't play an important part in the message.The reset button can be used to reset all controls to their initial values within the form. The user can send the form to the server by clicking on the submit button.
The other controls are useful for the message submitted to the server.
If you want to see the HTML tags by categories, please visit this page.
This element requires a closing tag.
Example HTML code 1:
This example illustrates the use of the form element:
Did you find this example helpful?
User Contributed Comments