Home
CSS
CSS Buttons
Tryit: Disabled button
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> .button { background-color: #04AA6D; /* Green */ border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; cursor: pointer; } .disabled { opacity: 0.6; cursor: not-allowed; } </style> </head> <body> <h2>Disabled Button</h2> <p>Use the opacity property to add some transparency to a button (make it look disabled):</p> <button class="button">Normal Button</button> <button class="button disabled">Disabled Button</button> </body> </html>