HTML keygen tag

keygen stands for key generator.<keygen> element generates public-private key pair. The public key is sent to the server after submitting the form. This element is the child of form element.

Example

Email:
Password:

Try </>
Warning! <keygen> is now obsolete.

Specific uses

It is used to protect password in a login system.

Related tags

TagsDescription
<form> It breaks a line into multiple lines.
<form> form data </form>
<input> It breaks a line into multiple lines.
<form> <input>input data</input> </form>

Tag omission

There is no end tag of <keygen> element.

Global Attributes

All global attributes are applicable on <keygen> element.

Specific Attributes

<keygen> tag attributes

AttributesDescription
autofocus focuses the cursor element to the keygen input control.
<keygen name="keysecurity" autofocus>
challenge a type of string to submit with public key.
disabled disables the keygen element. It is not focusable.
<keygen name="keysecurity" disabled>
form It associates keygen element with a form.
<keygen name="keysecurity" form="id of the form">
keytype Some kind of key with RSA algorithm.
<keygen name="keysecurity" keytype="rsa">
name Specifies a unique name for processing
<keygen name="keysecurity" >


Was this article helpful?