HTML Code for Button disabled

Introduction to disabled button in HTML

In HTML, the disabled attribute is used to make a button unclickable and visually indicate that it cannot be interacted with.

Benefits of using disabled button

The disabled button is useful for scenarios where user input or certain conditions are required to enable the button. It provides a way to prevent users from taking action when it's not appropriate.

Syntax for creating a disabled button in HTML

To create a disabled button in HTML, the following is the syntax:

Example code

<button type="button" disabled>Submit</button>

Go from files to website in seconds.

Start a free trial for 7 days — no credit card required

Get Started for Free