HTML textarea Tag and JavaScript
Attributes - option w3.org
Attribute | Value | Description |
autofocus | autofocus | Allows the author to indicate that a control is to be focused as soon as the page is loaded |
cols | number | specifies the expected maximum number of characters per line. by defult, it is 20. |
disabled | disabled | If present, make the control non-interactive and to prevent its value from being submitted. |
form | form_id | Associate the textarea element with its form owner. |
maxlength | number | Specifies the maximum number of characters allowed in the text area |
name | text | Represents the element's name. |
placeholder | text | Represents a hint (a word or short phrase) intended to aid the user with data entry. The placeholder attribute should not be used as an alternative to a label. |
readonly | readonly | Control whether the text can be edited by the user or not. |
required | required | When specified, the user will be required to enter a value before submitting the form. |
rows | number | Specifies the number of lines to show. by defult, it is 2. |
wrap | soft/ hard |
soft |
<p>If you have any comments, please let us know:
<textarea cols="80" name="comments"></textarea></p>
Previous page: HTML input Tag
Next page: The Basics of PHP Objects