Basic HTML

Advance HTML

HTML Tags Reference

HTML Code Generator


HTML <keygen> Tag


HTML <keygen> tag define to generate a secure key pair of selected field in HTML form.

When form is submitted to a server also send public key and user private key is store in internal.

HTML <keygen> tag introduce in HTML5.


Example-Code:

    <form action="" method="get">
      Username: <input type="text" name="user_name">
      Password: <input type="text" name="password">
      <keygen name="rsa_algo">
      <input type="submit">
    </form>

<keygen> tag Attributes

Attributes Value Description
autofocus autofocus Focus on this <keygen> element control automatically when page is loads
challenge challenge Specifies <keygen> element is challenged when form is submitted
disabled disabled Specifies <keygen> element control disabled
form Form_ID Specifies Form id which this control is surrounding to that form
keytype RSA
DSA
Specifies key type (RSA Algorighm Key, DSA Algorithm Key)
name name Defines name of the <keygen> element

Dynamic Attributes

<keygen> tag supported following Dynamic attributes.:


Attributes Value Description
id ID_Name Declared unique id for the element.
class Predefined_Class Used in Cascading Style Sheet (CSS).
style style_Attributes CSS code specify inline the HTML element is presented.
title Title_Description Display on the "tooltip" for your elements.

Event Attributes

<keygen> tag supported following Event attributes.:

Attributes Value Description
onclick "Java_script" clicked on object when script tobe run.
ondblclick "Java_script" double click on object when script tobe run.
onkeydown "Java_script" key is pressed when script tobe run.
onkeypress "Java_script" key is pressed over element then released when script tobe run.
onkeyup "Java_script" key is released over element when script tobe run.
onmousedown "Java_script" mouse button was pressed over an element when script tobe run.
onmouseout "Java_script" mouse pointer release over an element when script tobe run.
onmousemove "Java_script" run mouse pointer moved when script tobe run.
onmouseover "Java_script" run mouse pointer move over when script tobe run.
onmouseup "Java_script" mouse button is released when script tobe run.