HTML5 Tutorials & More

<keygen> Tag

The <keygen> tag defines a generated key.

Supported In HTML4: Yes

Supported In HTML5: Yes

HTML4 vs HTML5 Differences: The keygen element is new in HTML 5.

Attributes

Title Values Description HTML4 Support HTML5 Support
autofocus disabled Makes the input field focused on page load No Yes
challenge challenge If present, the value of the keygen is set to be challenged when submitted. No No
disabled disabled Disables the input element when it first loads so that the user can not write text in it, or select it. Note: Cannot be used with type="hidden" No No
form formname Defines one ore more forms the input field belongs to. No No
keytype rsa Defines the keytype. rsa generates a RSA key. No No
name fieldname Defines a unique name for the input element. The name attribute is used to collect the fields value when submitted. No No

Standard Attributes

Event Attributes

HTML5 Tags