HTML5 has several new elements and attributes for forms.
The <datalist> element specifies a list of options for an input field.
The list is created with <option> elements inside the <datalist>.
To bind a <datalist> to an input field, let the list attribute of the input
field refer to the id of the datalist:
Tip: The <option> elements should always have a value attribute.
<keygen> Element
The purpose of the <keygen> element is to provide a secure way to authenticate
users.
The <keygen> element is a key-pair generator. When a form is submitted,
two keys are generated, one private and one public.
The private key is stored on the client, 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.
Currently, the browser support for this element is not good enough to be a
useful security standard.
Example
<form action="demo_form.asp" method="get">
Username: <input type="text" name="usr_name" />
Encryption:
<keygen name="security" />
<input type="submit" />
</form>
Tip: The <option> elements should always have a value attribute.
<keygen> Element
The purpose of the <keygen> element is to provide a secure way to authenticate
users.
The <keygen> element is a key-pair generator. When a form is submitted,
two keys are generated, one private and one public.
The private key is stored on the client, 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.
Currently, the browser support for this element is not good enough to be a
useful security standard.
Example
<form action="demo_form.asp" method="get">
Username: <input type="text" name="usr_name" />
Encryption:
<keygen name="security" />
<input type="submit" />
</form>
Tip: The <option> elements should always have a value attribute.
<keygen> Element
The purpose of the <keygen> element is to provide a secure way to authenticate
users.
The <keygen> element is a key-pair generator. When a form is submitted,
two keys are generated, one private and one public.
The private key is stored on the client, 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.
Currently, the browser support for this element is not good enough to be a
useful security standard.
Example
<form action="demo_form.asp" method="get">
Username: <input type="text" name="usr_name" />
Encryption:
<keygen name="security" />
<input type="submit" />
</form>