
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML Textarea Disabled Attribute
The disabled attribute of the <textarea> element is used to disable <textarea>. After disabling, you won’t be able to select the text from the <textarea>.
Syntax
Following is the syntax −
<textarea disabled>
Example
Let us now see an example to implement the disabled attribute of the <textarea> element −
<!DOCTYPE html> <html> <body> <h2>Candidate Details</h2> Student Name: <input type="text" value="David"><br> Student Id: <input type="number" value="007"><br> <p>Educational Qualification (Graduation)</p> <select> <option value="bca">B.Tech</option> <option value="btech">BCA</option> <option value="bcom">B.COM</option> <option value="bsc">B.SC</option> <option value="bba">BBA</option> </select> <p>Educational Qualification (Post-Graduation)</p> <select> <option value="mca">MCA</option> <option value="mtech">M.Tech</option> <option value="mcom">M.COM</option> <option value="msc">M.SC</option> </select></br> <p>Info:</p> <textarea rows="5" cols="30" disabled> You need to also bring the certificates for the degrees mentioned above. </textarea> </body> </html>
Output
This will produce the following output −
In the above example, we have set a drop-down list and a textarea −
<select> <option value="mca">MCA</option> <option value="mtech">M.Tech</option> <option value="mcom">M.COM</option> <option value="msc">M.SC</option> </select></br> <p>Info:</p> <textarea rows="5" cols="30" disabled> You need to also bring the certificates for the degrees mentioned above. </textarea>
The <textarea> is disabled using the disabled attribute i.e. visitor won’t be able to edit it −
<textarea rows="5" cols="30" disabled> You need to also bring the certificates for the degrees mentioned above. </textarea>
Advertisements