The HTML5 <form> tag is utilized such that a form that can be answered by the user may be incorporated within the document. The HTML5 <form> tag is also frequently used along with other form elements like the following:
- <input>
- <textarea>
- <button>
- <select>
- <option>
- <optgroup>
- <fieldset>
- <datalist>
- <output>
- <label>
Using the HTML5 <form> tag is slightly different compared to its functions on HTML4.01. There are some new attributes that are used in HTML5 but are not present in HTML4.01. Aside from that some attributes from HTML4.01 are already considered as obsolete.
Attributes for the HTML5 <form> tag are the following:
|
Attribute
|
Value
|
Description
|
|
accept
|
MIME_type
|
Not supported
in HTML5
|
|
accept-charset
|
character_set
|
Identifies character encodings
|
|
action
|
URL
|
Identifies
location where to send the form-data upon
form submission
|
|
autocompleteNew
|
on
off
|
Identifies
autocomplete on or off
|
|
enctype
|
application/x-www-form-urlencoded
multipart/form-data
text/plain
|
Identifies
how to encode data when submitting it to
the server
|
|
method
|
get
post
|
Identifies
the HTTP method
|
|
name
|
text
|
Identifies
the name of a form
|
|
novalidateNew
|
novalidate
|
Identifies
that form validation
|
|
target
|
_blank
_self
_parent
_top
|
Identifies
place of the form response.
|