Dofactory.com
Dofactory.com

HTML <textarea> disabled Attribute

The disabled attribute on a <textarea> tag disables the element.

It appears grayed out and is unusable.

Example

#

A <textarea> element with a disabled attribute.
The control is unusable and its value is excluded from form submission.


<form action="/tutorial/action.html">
  <textarea disabled name="message" rows="3" cols="55">
    This is a message. 
  </textarea><br />

  <button type="submit">Submit</button>
</form>



Using disabled

The disabled attribute specifies that the textarea is disabled.

The textarea appears grayed out and is unusable.

Disabled textareas are excluded from form submission.


Syntax

<textarea disabled>
or
<textarea disabled="disabled">

Values

#

Value Description
disabled Use value 'disabled' or no value at all. Both are valid.

Browser support

Here is when disabled support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <textarea>

Author: Jack Poorte
Published: Jun 20 2021
Last Reviewed: Sep 30 2023


Quick question: what's your favorite/least favorite part of Dofactory?


Guides