HTML: The Markup Language

keygenkey-pair generator/input control NEW # T

The keygen element represents a control for generating a public-private key pair and for submitting the public key from that key pair.

Permitted content #

empty (void element)

Permitted attributes #

Descriptions for attributes specific to this element #

challenge = string
A challenge string that is submitted along with the public key.
keytype = "rsa"
The type of key generated.

Additional constraints and admonitions #

Tag omission #

The keygen element is a void element. A keygen element must have a start tag but must not have an end tag.

Permitted parent elements #

any element that can contain phrasing elements

DOM interface #

interface HTMLKeygenElement : HTMLElement {
           attribute boolean autofocus;
           attribute DOMString challenge;
           attribute boolean disabled;
  readonly attribute HTMLFormElement form;
           attribute DOMString keytype;
           attribute DOMString name;

  readonly attribute DOMString type;

  readonly attribute boolean willValidate;
  readonly attribute ValidityState validity;
  readonly attribute DOMString validationMessage;
  boolean checkValidity();
  void setCustomValidity(in DOMString error);

  readonly attribute NodeList labels;