HTML <textarea> Tag
The HTML <textarea> tag is used within a form to declare a textarea element - a control that allows the user to input text over multiple rows.
- Example Code:
You can write whatever text you want in the textarea.
Attribute Definition name Assigns a name to the input control. rows Specifies the height of the textarea based on the number of visible lines of text. If there's more text than this allows, users can scroll using the textarea's scrollbars. cols Specifies the width of the textarea based on the number of visible character widths. readonly Sets the textarea to read-only - it won't allow the user to change the value. The textarea however, can receive focus and is included when tabbing through the form controls. disabled Disables the input control. The button won't accept changes from the user. It also cannot receive focus and will be skipped when tabbing.
- Global Attributes:
The <textarea> tag also supports the Global Attributes in HTML5
- Event Attributes:
The <textarea> tag also supports the Event Attributes in HTML5