Skip to content
Related Articles

Related Articles

HTML <select> disabled Attribute
  • Difficulty Level : Basic
  • Last Updated : 04 Jan, 2019

The disabled attribute for <select> element in HTML is used to specify that the select element is disabled. A disabled drop-down list is un-clickable and unusable. It is a boolean attribute.

Syntax:

<select disabled>option values...</select>

Example:




<!DOCTYPE html> 
<html
    <head
        <title>HTML select disabled Attribute</title
    </head
  
    <body style = "text-align:center">    
        <h1 style = "color: green;">GeeksforGeeks</h1>
        <h2>HTML select disabled Attribute</h2>
  
        <p>This select field is disabled.</p>
  
        <!--A disabled select-->
        <select disabled>
            <option value="binary">Binary Search</option>
            <option value="linear">Linear Search</option>
            <option value="interpolation">Interpolation Search</option>
        </select>
    </body
</html>    

Output:
disabledselect

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

  • Apple Safari
  • Google Chrome
  • Firefox
  • Opera
  • Internet Explorer

full-stack-img

My Personal Notes arrow_drop_up
Recommended Articles
Page :