Advertisement

HTML <keygen> tag

Examples

With keygen field form:

<form action="demo_keygen.asp" method="get">
Username: <input type="text" name="usr_name" />
Encryption: <keygen name="security" />
<input type="submit" />
</form>

Try it yourself

Browser Support

IE Firefox Chrome Safari Opera

Firefox, Chrome, Opera and Safari 6 Support <keygen> tag.

Definition and Usage

<Keygen> tag is used to form a predetermined key pair generator field.

When submitting a form, sent to the server private key is stored in the local public.

Browser Support

All major browsers support <keygen> tag, in addition to Internet Explorer and Safari.

HTML 4.01 and HTML 5 differences between

keygen is a new HTML element.

Attributes

new: HTML5 new property.

Attributes value description
autofocus autofocus So keygen field gets the focus when the page loads.
challenge challenge If used, it will set the value keygen asked when submitting.
disabled disabled Disable keytag field.
form formname Define one or more forms the keygen field belongs.
keytype rsa Defined keytype. rsa RSA key.
name fieldname

Define a unique name keygen element.

name attribute is used to collect the value of the field when the form is submitted.

Global Properties

<keygen> tag supports HTML in the global properties .

Event Properties

<keygen> tag supports HTML in the event properties .

Related Pages

HTML DOM Reference: Keygen objects