Дефиниция и начин на използване
Тагът <textarea> дефинира многоредов контрол на текстовото въвеждане.
Текстовата област може да съдържа неограничен брой знаци, а текстът се изобразява с шрифт с фиксирана ширина (usually Courier).
Размерът на текстовата област може да се определи от атрибутите „cols and rows“ или дори по-добре; чрез CSS свойствата „височина и ширина“.
Поддръжка от браузърите
Element | |||||
---|---|---|---|---|---|
<textarea> | Yes | Yes | Yes | Yes | Yes |
Разлики между HTML 4.01 и HTML5
HTML5 добави няколко нови атрибут
Атрибути
= New in HTML5.
Attribute | Value | Description |
---|---|---|
autofocus | autofocus | Specifies that a text area should automatically get focus when the page loads |
cols | number | Specifies the visible width of a text area |
dirname | textareaname.dir | Specifies that the text direction of the textarea will be submitted |
disabled | disabled | Specifies that a text area should be disabled |
form | form_id | Specifies one or more forms the text area belongs to |
maxlength | number | Specifies the maximum number of characters allowed in the text area |
name | text | Specifies a name for a text area |
placeholder | text | Specifies a short hint that describes the expected value of a text area |
readonly | readonly | Specifies that a text area should be read-only |
required | required | Specifies that a text area is required/must be filled out |
rows | number | Specifies the visible number of lines in a text area |
wrap | hard soft |
Specifies how the text in a text area is to be wrapped when submitted in a form |
Глобални атрибути
Тагът <textarea> също така поддържа всички Глобални атрибути в HTML.
Атрибути за събития
Тагът <textarea> също така поддържа Атрибути за събития в HTML..
Стандартни настройки за CSS
Няма.