Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML disabled Attribute

  • Last Updated : 05 Oct, 2021

The HTML <keygen> disabled attribute is a boolean attribute that indicates whether the <keygen> element is disabled or not. It is used to keep a user from using an input field until some conditions would be applied to it. 

Note: We can use JavaScript to change the value of the disabled <keygen> element.

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

Syntax:

<keygen disabled>

Example: The below code illustrates the disabled attribute. 



HTML




<!DOCTYPE html>
<html>
  
<body>
    <center>
        <h1 style="color:green;">
            GeeksforGeeks
        </h1>
  
        <h2>HTML Keygen disabled attribute</h2>
  
        <form>
            Username: <input type="text" name="uname">
            <br><br>
              
            Password: <input type="text"><br>
            Encryption Element Value:
            <keygen form="myGeeks" name="secure" disabled>
            <br><input type="submit">
        </form>
    </center>
</body>
  
</html>

Output:

Supported Browsers: 

  • Google Chrome
  • Firefox
  • Opera
  • Apple Safari
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!