input disabled Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input

Description

The disabled attribute is a boolean attribute to set if the <input> element should be disabled.

In XHTML, the disabled attribute must be defined as <input disabled="disabled" />.

An HTML form with a disabled input field:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<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><!--  w  w w. ja v a2s .  c o  m-->

</body>
</html>

Related Tutorials