HTML slt;textarea.gt; tags
The label represents a multi-line plain text editing control that users can write to their text area, as shown in the following example:Browser support
All major browsers support the hashtags.
Label definition and instructions for use
The label defines a multi-line text input control.
An unlimited amount of text can be accommodated in a text area, where the default font for text is an equal width font (usually Courier).
You can specify the size of textarea by using the cols and rows properties, but a better approach is to use the height and width properties of CSS.
Tip: You
can set the line wrap mode in the text input area by using the wrap property of the label, please refer to the property table below.
The difference between HTML 4.01 and HTML5
HTML5 adds some new properties.
Property
New : The new property in HTML5.
Attributes | value | describe |
---|---|---|
autofocus New | autofocus | The text area automatically gets focus when the page is loaded. |
cols | number | Specifies the number of columns visible in the text area. |
disabled | disabled | It is specified to disable text area. |
form New | form_id | Define one or more forms to which the text area belongs. |
maxlength New | number | The maximum number of characters allowed in the text area. |
name | text | Specify the name of the text area. |
placeholder New | text | A short tip is specified, describing the input value expected by the text area. |
readonly | readonly | The provisions of the text are read-only. |
required New | required | The provisions of the text are required / needed. |
rows | number | Specifies the number of rows visible in the text area. |
wrap New |
hard
soft |
The text in the text area should be wrap when submitting the form. |
Global properties
The label supports the global properties of HTML.
The event property
The tag supports the event properties of HTML.
Related articles
HTML DOM Reference Manual: Textarea Object