English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML keygen form attribute

How to use the HTML keygen form attribute, browser compatibility, syntax definition, and detailed information about its attribute values, etc. are demonstrated in online examples.

 HTML <keygen> tag

Online Example

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

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML <keygen> form Attribute Usage-基础教程(oldtoolbag.com)</title>
</head>
<body>
<form action="demo-frame.php" method="get" id="secureform">
  Username: <input type="text" name="usr_name">
  <input type="submit">
</form>
<p>The registration machine field is outside the form, but it still belongs to part of the form./p>
Encryption: <keygen name="security" form="secureform">
<p><strong>Attention:</strong> IE browser does not support keygen tag.</p>
</body>
</html>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

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

Definition and Usage

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

HTML 4.01 and HTML5differences between

<keygen> tag is an HTML5 of the new tag in.

Syntax

<keygen form="form_id">

Attribute value

ValueDescription
form_idSpecify a list of one or more forms that the <keygen> element belongs to, separated by spaces.
 HTML <keygen> tag