html tutorial - keytype Attribute in HTML - html5 - html code - html form

Keytype attribute in html

Learn html - html tutorial - Keytype attribute in html - html examples - html programs

  • The keytype attribute is used to specifies the type of key generated.
  • The default value of keytype attributes is RSA (asymmetric cryptography algorithm).

Syntax for keytype attribute :

<keygen keytype="rsa|dsa|ec">

Differences between HTML 4.01 and HTML5 for keytype attribute:

HTML 4.01:

  • HTML4 does not support <keygen> element.


  • HTML5 support <keygen> element.

Applies to:

Element Attribute
<keygen> keytype

align Attribute Value:

Value Description
rsa Specifies an RSA security algorithm.
dsa Specifies a DSA security algorithm.
ec Specifies an EC security algorithm.

Sample coding for keytype attribute :

<!DOCTYPE html>
        <title>Wikitechy keytype Attribute</title>
        <form action="keytype_att.html">
            Username : <input type="text" name="username">
            Encryption : <keygen keytype="rsa" name="security">    
            <input type="submit">

Code Explanation :

keytype Attribute Code Explanation

  1. keytype attribute is used to specifics that type of key is a rsa security algorithm.

Sample Output :

keytype Attribute Output

  1. The output shows keytype selection in a drop down-list.

Browser Support for keytype attribute in HTML :

Yes No Yes No Yes

Related Searches to keytype Attribute in html