jump

HTML 5: The Markup Language (ARIA Edition)

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 contents #

empty (void element)

Permitted attributes #

global attributes
Any attributes permitted globally.
challenge = string #
A challenge string that is submitted along with the public key.
keytype = d:string "rsa" #
The type of key generated.
autofocus = d:string "autofocus" or d:string "" NEW #
Specifies that the element represents a control to which a UA is meant to give focus as soon as the document is loaded.
name = string #
The name part of the name/value pair associated with this element for the purposes of form submission.
disabled = d:string "disabled" or d:string "" #
Specifies that the element represents a disabled control.
form = ID reference NEW #
The value of the id attribute on the form with which to associate the element.

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(DOMString error);

  readonly attribute NodeList labels;
};