The form is a container for the user input fields. All the fields within the form tag will be submitted when the form is submitted.
action
represents the URL to which the form data will be sent when the form is submitted.
- URL
method
represents by which HTTP method the form-data will be submitted.
- get - appends form data (name/value pair) to URL with ‘?’. Eg. URL?name=value
- post - form-data will be sent as HTTP post-transaction.
enctype
represents how the form data will be encoded before submitting.
- application/x-www-form-urlencoded - All form data will be encoded. Default value.
- multipart/form-data - when the file is to be uploaded with form data.
- text/plain - No data will be encoded at all.
accept-charset
represents character encodings that are used when the form is submitted.
- character_set - space-separated list of one or more character encodings. UTF-8 for Unicode.
autocomplete
represents whether the form data should be filled automatically when a form is submitted.
- on - browser automatically complete the values
- off - the user has to fill the data by itself.
name
represents the name of the form.
- text
novalidate
represents no form data should be validated while form submission.
- none
target
represents where the response of the form will be displayed after submission.
- _self - response will be load in the same browser context/tab.
- _blank - response will be load in a new browser window/ tab.
- _parent - response will be load in a parent browser window.
HTML form Example:
Edit Example