HTML keygen Tag

Advertisements


Description

The HTML <keygen> tag is used to process Web forms with certificate management systems. The element generates a secure key and submits the public key.

Example

<!DOCTYPE html>
<html>
<head>
<title>HTML keygen Tag</title>
</head>
<body>
<form>
<keygen name="random_key" challenge="0987654321">
<input name="firstname" value="first name">
</form>
</body>
</html>

This will produce following result:

Global Attributes

This tag supports all the global attributes described in - HTML Attribute Reference

Specific Attributes

The HTML <keygen> tag also supports following additional attributes:

AttributeValueDescription
autofocus html-5autofocusSpecifies that when the page loads the <keygen> element automatically gets focus.
challengehtml-5challengeSpecifies the challenge string to be packaged with the public key in the PublicKeyAndChallenge for use in verification of the form submission. If no challenge string is provided, then it is encoded as an IA5STRING of length zero./td>
disabled html-5disabledSpecifies that <keygen> element should be disabled.
form html-5form_idSpecifies one or more forms.
keytype html-5rsa
dsa
ec
Specifies the secret algorithm which is for the key.
name html-5autofocusSpecifies a name.

Event Attributes

This tag supports all the event attributes described in - HTML Events Reference

Browser Support

ChromeFirefoxIEOperaSafariAndroid
YesYesNoYesYesYes

html_tags_reference.htm

Advertisements