A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-input-disabled-attribute/ below:

HTML <input> disabled Attribute - GeeksforGeeks

HTML <input> disabled Attribute

Last Updated : 12 Aug, 2022

The disabled attribute for <input> element in HTML is used to specify that the input field is disabled. A disabled input is un-clickable and unusable. It is a boolean attribute. The disabled <input> elements are not submitted in the form. 

Syntax:

<input disabled>

Example: 

html
<!DOCTYPE html> 
<html> 
    <head> 
        <title>HTML input disabled Attribute</title> 
    </head> 

    <body style = "text-align:center">    
        <h1 style = "color: green;">GeeksforGeeks</h1>
        <h2>HTML input disabled Attribute</h2>

        <label>Input:

            <!--A disabled input-->
            <input type="text" name="value" value = "This input field 
                   is disabled" disabled>
        </label>
    </body> 
</html>    

Output:

  

Supported Browsers: The browser supported by <input> disabled attribute are listed below:



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4