HTML <keygen> formAttributes

HTML keygen 标签参考手册HTML <keygen> Tag

Examples

A <keygen> element located outside the form (but still part of the form):

<form action="demo_keygen.html" method="get" id="secureform">
  Username: <input type="text" name="usr_name">
  <input type="submit">
</form>

Encryption: <keygen name="security" form="secureform">

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Firefox, Opera, Chrome, and Safari 6 support the form attribute of the <keygen> tag.


Definition and Usage

The form attribute specifies one or more forms to which the <keygen> element belongs.


Differences Between HTML 4.01 and HTML5

The <keygen> tag is new in HTML5.


Syntax

<keygen form="form_id">

Attribute Values

Value Description
form_id A space-separated list of form ids that specifies one or more forms to which the <keygen> element belongs.


HTML keygen 标签参考手册HTML <keygen> Tag Other Extensions