The HTML5 form Tag
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 |
Identifies autocomplete on or off |
enctype |
application/x-www-form-urlencoded |
Identifies how to encode data when submitting it to the server |
method |
get |
Identifies the HTTP method |
name |
text |
Identifies the name of a form |
novalidateNew |
novalidate |
Identifies that form validation |
target |
_blank |
Identifies place of the form response. |