A form with a keygen field:
![]()
The <keygen> tag is supported in Firefox, Opera, Chrome, and Safari 6.
The <keygen> tag specifies a key-pair generator field used for forms.
When the form is submitted, the private key is stored locally, and the public key is sent to the server.
The <keygen> element is new in HTML5.
New : New in HTML5.
| Attribute | Value | Description |
|---|---|---|
| autofocusNew | autofocus | Specifies that a <keygen> element should automatically get focus when the page loads |
| challengeNew | challenge | Specifies that the value of the <keygen> element should be challenged when submitted |
| disabledNew | disabled | Specifies that a <keygen> element should be disabled |
| formNew | form_id | Specifies one or more forms the <keygen> element belongs to |
| keytypeNew | rsa dsa ec |
Specifies the security algorithm of the key |
| nameNew | name | Defines a name for the <keygen> element |
The <keygen> tag also supports the Global Attributes in HTML.
The <keygen> tag also supports the Event Attributes in HTML.
Your message has been sent to W3Schools.