Open In App
Related Articles

HTML <keygen> form Attribute

Improve Article
Save Article
Like Article

The HTML <keygen> form attribute is used to specify one or more forms that the <keygen> element belongs to.


<keygen form="form_id">

Attribute Values:  It contains single value form_id which specifies the one or more than one form that Keygen elements belong to. The value of this attribute should be id of the <form> element. Example Code: Below code illustrates the HTML <keygen>form attribute. 


<!DOCTYPE html>
    <h1 style="color:green;">
    <h2>HTML Keygen form attribute</h2>
    <form id = "myGeeks">
        Username: <input type="text" name="uname">
        <br><br> Encryption:
        <keygen form="myGeeks" name="secure">
        <input type="submit">





Supported Browsers:

  • Apple Safari 1.0
  • Google Chrome 1.0
  • Firefox 1.0
  • Opera 1.0


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 08 Sep, 2021
Like Article
Save Article
Similar Reads
Complete Tutorials