HTML textarea Tag disabled Attribute Tutorial

In this section, we will learn what the disabled attribute is in HTML <textarea> element and how to use it.

What is disabled Attribute in HTML <textarea> Tag?

As the name of the disabled attribute suggests, this attribute is used when we want to disable the access to a field created via the <textarea> element.

Applying this attribute to a <textarea> element will turn that field into gray and there’s no way for users to enter any value into it after that.

Note: the field still gets displayed and users can see it, however, they can’t use it to enter data.

HTML disabled Attribute in <textarea> Tag Syntax:

<textarea disabled> </textarea>

<textarea> Tag disabled Attribute Values

The disabled attribute does not take a value. Simply put, this attribute in the opening tag of HTML <textarea> element and that’s it. Users can no-longer use the field to insert data.

Example: using disabled attribute in HTML <textarea> tag

See the Pen using disabled attribute in HTML <textarea> tag by Omid Dehghan (@odehghan) on CodePen.

Leave a Reply