HTML textarea readonly attribute


A text area that is read-only:
<textarea rows="3" cols="25" readonly="readonly">
1000source codes is to share tutorials on all programming language

Definition and Usage

The readonly attribute specifies that a text area should be read-only.
In a read-only text area, the content cannot be changed, but a user can tab to it, and copy and paste the content from it.
The readonly attribute can be set to keep a user from using a text area until some other condition has been met (like selecting a checkbox, etc.). Then, a JavaScript is required to remove the readonly value, and make the text area editable.

Browser Support

The readonly attribute is supported in all major browsers.


<texarea readonly="value">

Attribute Values

Value Description
readonly Specifies that the text area should be read-only
HTML textarea readonly attribute Reviewed by 1000sourcecodes on 02:22 Rating: 5
Powered by Blogger.