HTML <form> Tag
The Form element is used on a web page to create a form with interactive controls for user input. This tag is sometimes referred to as the <form>
element.
The <form>
element is used to build a user-input HTML form.
The <form>
element may include one or more of the form components listed below:
Syntax
Attributes
Attribute | Value | Description |
---|---|---|
accept-charset | character-set | Specifies the character encodings to be used in form submission. |
action | URL | When a form is submitted, this property specifies where the form-data should be sent. |
autocomplete |
on
off |
Specifies whether autocomplete should be enabled or disabled for a form. |
enctype |
application/x-www-form-urlencoded
multipart/form-data text/plain |
Specifies how form data should be encoded before being submitted to the server (only for method="post"). |
method |
get
post |
When delivering form-data, this specifies the HTTP method to use. |
name | text | The name of a form is specified. |
novalidate | novalidate | The form should not be verified when submitted, according to this setting. |
rel |
external
help license next nofollow noopener noreferrer opener prev search |
Describes the connection between a linked resource and the current document. |
target |
_blank
_self _parent _top |
Specifies where the response obtained after submitting the form should be displayed. |
Supported Browsers
Element | Chrome | Firefox | Safari | Edge / IE | Opera |
---|---|---|---|---|---|
<form> | Yes | Yes | Yes | Yes | Yes |