![]() |
Definition and UsageThe When present, it specifies that the element should be disabled. A disabled element is unusable. The Applies toThe
Browser SupportThe |
Example:
HTML
<button type="button" disabled>Click Me!</button>
Fieldset Example.
Example:
HTML
<fieldset disabled>
<legend>Personalia:</legend>
Name: <input type="text"><br>
Email: <input type="text"><br>
Date of birth: <input type="text">
</fieldset>
An HTML form with a disabled input field.
Example:
HTML
<form action="/action_page.php">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname" disabled><br>
<input type="submit" value="Submit">
</form>
Optgroup Example. A disabled option-group.
Example:
HTML
<select>
<optgroup label="German Cars" disabled>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
</select>
Option Example. A drop-down list with one disabled option.
Example:
HTML
<select>
<option value="volvo" disabled>Volvo</option>
<option value="saab">Saab</option>
<option value="vw">VW</option>
<option value="audi">Audi</option>
</select>
Select Example.
Example:
HTML
<select disabled>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
Textarea Example.
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h1>The textarea disabled attribute</h1>
<textarea disabled>
At Horje.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>
</body>
</html>
html disabled attribute |
How to add A disabled button | HTML Attribute |
How to Disable a group of related form elements | HTML Attribute |
How to add An HTML form with a disabled input field | HTML Attribute |
How to add A disabled option-group | HTML Attribute |
How to add A drop-down list with one disabled option | HTML Attribute |
How to add A disabled drop-down list | HTML Attribute |
How to add A disabled text area: | HTML Attribute |
Read Full: | HTML Attribute |
Type: | Develop |
Category: | Web Tutorial |
Sub Category: | HTML Attribute |
Uploaded by: | Admin |
Views: | 64 |
Reffered: https://www.w3schools.com/tags/att_disabled.asp