Skip to content
Related Articles
Get the best out of our app
Open App

Related Articles

Which attribute is used to disabled the specific input field in HTML Form ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

HTML5 introduced many attributes that are used for developing an efficient webpage. 

In this article, we will learn to disable the particular input field by using the “disable” attribute with the specific type of input. The disabled attribute is a boolean attribute that is used to vandalize the input field. A disabled input is un-clickable and unusable. It is a boolean attribute. The disabled <input> elements are not submitted in the form. 


<input disabled> 

Example: Below HTML code illustrates how to disable a particular input field. 


<!DOCTYPE html>
         Disabled attribute for the input field in HTML Form?
    <body style="text-align:center">    
        <h1 style="color: green;">GeeksforGeeks</h1>
        <h2>Disabled attribute for the input field in HTML Form</h2>
         Name: <input type="text" name="value" 
                      value="This input field is disabled" disabled>
         <br></br> Address:
          <input type="text" name="value" value=
                 "Input field is not disabled" >          
         <input type="submit" value="This button is disabled" disabled>


My Personal Notes arrow_drop_up
Last Updated : 02 Feb, 2022
Like Article
Save Article
Similar Reads
Related Tutorials