Open In App
Related Articles

HTML <button> disabled Attribute

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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

Syntax:

<button disabled></button>

Example: 

html

<!DOCTYPE html>
<html>
 
<head>
    <title>HTML <button> disabled Attribute</title>
</head>
 
<body style="text-align:center">
    <h1 style="color: green;">GeeksforGeeks</h1>
    <h2>HTML <button> disabled Attribute</h2>
 
    <!--A disabled button-->
    <button type="button" disabled>I am disabled!</button>
</body>
 
</html>

                    

Output:

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

  • Apple Safari
  • Google Chrome
  • Edge 12 and above
  • Firefox
  • Opera

Last Updated : 03 Aug, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads