A form with a keygen field:
![]()
The <keygen> tag is supported in all major browsers, except Internet Explorer.
Note: Safari supports the <keygen> element on Mac only.
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 HTML5.
The <keygen> tag also supports the Event Attributes in HTML5.
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| XML Editor - Free Trial! |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|