The form element creates a form for user input.
Supported In HTML4: Yes
Supported In HTML5: Yes
HTML4 vs HTML5 Differences: HTML 5 has some new attributes, and some HTML 4.01 attributes are not supported in HTML 5.
Attributes
| Title | Values | Description | HTML4 Support | HTML5 Support |
| accept | MIME_type | No | Yes | |
| accept-charset | charset_list | A comma separated list of possible character sets for the form data. | No | No |
| action | URL | A URL that defines where to send the data when the submit button is pushed. | No | No |
| autocomplete | on off | If "on" browsers can store the form's input values, to auto-fill the form if the user returns to the page. If "off" browsers should not store this information. | No | No |
| enctype | application/x-www-form-urlencoded multipart/form-data text/plain | The mime type used to encode the content of the form. | No | No |
| method | get post put delete | The HTTP method for sending data to the action URL. Default is get. method="get": This method sends the form contents in the URL: URL?name=value&name=value. Note: If the form values contains non-ASCII characters or exceeds 100 characters you MUST use method="post". method="post": This method sends the form contents in the body of the request. Note: Most browsers are unable to bookmark post requests. | No | No |
| name | form_name | Defines a unique name for the form. | No | No |
| novalidate | novalidate | If present the form should not be validated when submitted. | No | No |
| target | _blank _self _parent _top | Where to open the target URL. _blank - the target URL will open in a new window _self - the target URL will open in the same frame as it was clicked _parent - the target URL will open in the parent frameset _top - the target URL will open in the full body of the window | No | No |
Standard Attributes
All standard attributes are supported.
Event Attributes
All event attributes are supported.
HTML5 Tags
- a
- abbr
- acronym
- address
- applet
- area
- article
- aside
- audio
- b
- base
- basefont
- bdo
- big
- blockquote
- body
- br
- button
- canvas
- caption
- center
- cite
- code
- col
- colgroup
- command
- datalist
- dd
- del
- details
- dfn
- dir
- div