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.
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.