HTML <textarea> tag
HTML <textarea> tag
The <textarea>
tag defines a multi-line plain-text editing control.
The <textarea>
tag is used when you want to allow users to enter a sizeable amount of text. For example, to receive feedbacks, comments, edits, questions etc.
By default, text in a <textarea>
is rendered in a monospace or fixed-width font.
Example
Attributes
The following are the attributes of <textarea> tag. Also try Global attributes.
Attribute | Value | Explanation |
---|---|---|
autocomplete |
| Specifies whether the value of the <textarea> element can be automatically completed by the browser. |
autofocus | - | Specifies that a textarea should automatically get focus when the page loads. |
cols | number | Specifies the width of a textarea. |
dirname | myName.dir | Specifies that the text direction of the textarea will be submitted |
disabled | - | Specifies that a textarea should be disabled. |
form | form_id | Specifies that one or more textarea outside the forms tag belongs to it. |
maxlength | number | Specifies the maximum number of characters allowed in the textarea (including space and new line). |
minlength | number | Specifies the minimum number of characters required in the textarea (including space and new line). |
name | text | Specifies a name for a textarea. |
placeholder | text | Specifies a short description about what this textarea is for. |
readonly | - | Specifies that the user cannot modify the value in the textarea. |
required | - | Specifies that the user must fill in a value in the textarea before submitting a form. |
rows | number | Specifies the number of lines in a textarea. |
spellcheck | - | Specifies automatic spelling check. |
wrap |
| Specifies how to wrap the text in a textarea, when a form is submitted. |
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.