The <keygen> tag marks a key-pair generator field used for forms.
<keygen> |
Yes | No | Yes | Yes | Yes |
The <keygen> element is new in HTML5.
Attribute | Value | Description |
---|---|---|
autofocus | autofocus | Mark whether a <keygen> element should automatically get focus when the page loads |
challenge | challenge | Set that the value of the <keygen> element should be challenged when submitted |
disabled | disabled | disable that a <keygen> element |
form | form_id | Set the owner form id for the <keygen> element |
keytype | rsa dsa ec |
Set the security algorithm of the key |
name | name | Set a name for the <keygen> element |
The <keygen> tag supports the Global Attributes in HTML.
The <keygen> tag supports the Event Attributes in HTML.
None.
<!DOCTYPE html>
<html>
<body>
<!-- w w w . j a v a2s.co m-->
<form action="demo.asp" method="get">
Username: <input type="text" name="usr_name">
Encryption: <keygen name="security">
<input type="submit">
</form>
</body>
</html>