The most important form element is the <input> element.
The <input> element can be displayed in several ways, depending on the type attribute.
The <select> element defines a drop-down list.
The <option> elements defines an option that can be selected.
By default, the first item in the drop-down list is selected.
To define a pre-selected option, add the selected attribute to the option.
The <textarea> element defines a multi-line input field (a text area).
The rows attribute specifies the visible number of lines in a text area.
The cols attribute specifies the visible width of a text area.
The <button> element defines a clickable button.
The <datalist> element specifies a list of pre-defined options for an <input> element.
Users will see a drop-down list of the pre-defined options as they input data.
The list attribute of the <input> element, must refer to the id attribute of the <datalist> element.
Note: The datalist tag is not supported in Safari or IE9 (and earlier).
The purpose of the <keygen> element is to provide a secure way to authenticate users.
The <keygen> element specifies a key-pair generator field in a form.
When the form is submitted, two keys are generated, one private and one public.
The private key is stored locally, and the public key is sent to the server.
The public key could be used to generate a client certificate to authenticate the user in the future.
The <output> element represents the result of a calculation (like one performed by a script).
Note: The output element is not supported in Edge 12 or Internet Explorer and earlier versions.