Home » HTML Button Disabled

HTML Button Disabled

by Online Tutorials Library

HTML Button Disabled

The ‘disabled‘ is an attribute of <button> tag in HTML, which is used to denote that the button is disabled. It is a Boolean attribute. The disabled button cannot be used for clicking, and it appears as a grey color.

Syntax

Examples: The following examples are using different buttons and make them disabled.

Example 1: The following example disables the submit button.

Test it Now

Output:

HTML Button Disabled

Example 2: The following example disables the reset button.

Test it Now

Output:

HTML Button Disabled

Browser Support

Element chrome browser Chrome ie browser IE firefox browser Firefox opera browser Opera safari browser Safari
<Button disabled> Yes Yes Yes Yes Yes

Next TopicHTML font color

You may also like