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

HTML Reference Manual

HTML Tag Directory

HTML keygen disabled attribute

The keygen disabled attribute is a boolean attribute that specifies whether the <keygen> element should be disabled. The disabled field is not available and cannot be edited.

 HTML <keygen> tag

Online Example

A disabled <keygen> element:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML <keygen> disabled Attribute Usage-Basic Tutorial(oldtoolbag.com)</title>
</head>
<body>
<form action="demo-frame.php" method="get">
  Username: <input type="text" name="usr_name">
  Encryption: <keygen name="security" disabled>
  <input type="submit">
</form>
</body>
</html>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

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

Definition and Usage

The disabled attribute is a boolean attribute.

The disabled attribute specifies that the <keygen> element should be disabled. The disabled field is not available and cannot be edited.

can set the disabled attribute to enable the field for the user to use under certain conditions (such as checking a checkbox, etc.), and then use JavaScript to remove the disabled value, making the field available for use.

HTML 4.01 between5differences

The <keygen> tag is an HTML5 new tags.

Differences between HTML and XHTML

In XHTML, attribute shorthand is prohibited, and the disabled attribute must be defined as <keygen disabled="disabled" in XHTML. />。

Syntax

<keygen disabled>
 HTML <keygen> tag