HTML <textarea> disabledAttribute

HTML textarea 标签参考手册HTML <textarea> Tag

Examples

A disabled text area:

<textarea disabled>
At example.com you will learn how to create websites. We provide the most comprehensive web technology tutorials.
</textarea>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the disabled attribute.


Definition and Usage

The disabled attribute is a boolean attribute.

The disabled attribute specifies that the text area should be disabled.

A disabled text area is unusable, and its text cannot be selected (cannot be copied).

You can set the disabled attribute, and only when certain conditions are met (such as selecting a checkbox) is the user's use of the text area restored. Then, JavaScript can be used to remove the value of the disabled attribute to make the text area usable.


Differences between HTML 4.01 and HTML5

None.


Differences between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the disabled attribute must be defined as <textarea disabled="disabled">.


Syntax

<textarea disabled>


HTML textarea 标签参考手册HTML <textarea> Tag Other Extensions