html tutorial - <keygen> - Keygen Tag in HTML - html5 - html code - html form



keygen tag in html

Learn html - html tutorial - keygen tag in html - html examples - html programs

  • The <keygen> tag are specifies a key-pair field generator used for the forms.
  • The element generates, public key is sent the server side and locally stored the private key after the form submit.
  • The <keygen> tag supports the Global Attributes and Event Attribute.
  • The <keygen> tag belongs to flow content, phrasing content, interactive content, listed, labelable, submittable, resettable form-associated element, palpable content.

Syntax for <keygen> tag:

<keygen name=”value”>

Differences between HTML 4.01 and HTML 5 for <keygen> tag:

HTML 4.0.1

  • <keygen> tag is not supported in HTML 4.01

HTML 5

  • The <keygen> tag is new in HTML 5 version.

Sample Coding for <keygen> tag:

Tryit<!DOCTYPE html>
<html >
      <body>
          <form>
              Username: <input type="text" name="usr_name" value=wikitechy>
              Encryption:<keygen name="security">
              <input type="submit">
          </form>
      </body>
</html>

Code Explanation for <keygen> tag:

<keygen> Tag Code Explanation

  1. The <keygen> tag is used to process the web forms for the security encryption system.

Output for <keygen> tag:

<keygen> Tag Output

  1. The <keygen> tag is used to generate the security encryption system for form submission.

Attributes of <keygen> tag:

Attribute Value HTML4 HTML5 Description
autofocus autofocus No Yes It specifies that <keygen> element should automatically get focus when the page loads.
challenge challenge Yes Yes It specifies that the value of the <keygen> element should be challenged when submitted.
form form_id No Yes It specifies one or more forms.
keytype rsa
dsa
ec
Yes Yes It specifies the key for the security algorithm.
name name Yes Yes It Specifies the name of an <keygen> element.
disabled disabled Yes Yes It Specifies that a <keygen> element should be disabled.

Browser Support for <keygen> tag in HTML:

1.0 No 1.0 1.2 3.0

Related Searches to keygen tag in html