Home HTML/CSS CSS: How to Define the attributes of Textarea Tag in HTML - Readonly and Disabled
Author:

The tag <textarea> defines a multi-line text input control. Textarea have an opening and closing tag, any words inserted
between them will appear inside your text area.

Here is the syntax of Textarea tag: <textarea> This is textarea tag</textarea>

In this lesson, you will learn how to work with Readonly and Disabled attributes.

The first attribute we work with is Readonly.

Syntax : <texarea readonly="value">
Attribute Values: readonly

Example:

<textarea cols="20" rows="5" readonly="readonly">Specifies that the text area should be read-only</textarea>

Result:

The second attribute is Disabled:

Syntax: <textarea disabled="value">
Attribute Valutes: disabled

Sample:

<textarea cols="20" rows="5" disabled="disabled">Specifies that the text area should be disabled</textarea>

Result:

Did you like this tip 

The <textarea> tag is supported in all major browsers.



Comments (0)
Write comment
Your Contact Details:
Comment:
Security
Please input the anti-spam code that you can read in the image.

"