Hi,
How to disable a Button in HTML using CSS?
<input type="button" value="Submit"></input>
When page loaded the button should be disabled by default.
Hi makenzi.exc,
Set pointer-events to none and cursor to not-allowed in CSS.
Refer below example.
HTML
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> <style type="text/css"> body { font-family: Arial; font-size: 10pt; } </style> </head> <body> <input type="button" value="Submit" class="btn-disable" /> <style type="text/css"> .btn-disable { cursor: not-allowed; pointer-events: none; color: #C0C0C0; } </style> </body> </html>
Demo
Screenshot
Downloads
Download Sample
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.