Disable button in Html

Disable Button

Button is used to do some action when a user clicks it.
To make it disable, we can define disable attribute as true. No clicking is allowed in disabled button.


Example:

<!DOCTYPE html>
<html>
<head>
<title>Button</title>
</head>

<body>
<button>Normal button</button>
<button disabled="true">Disable button</button>
</body>
</html>

Output of this code will look like this: