English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <textarea> Tag

Das HTML- <textarea>-Element stellt einen mehrzeiligen reinen Text-Editor-Kontrollfeld dar. Die Anfangs- und End-Tags dürfen nicht weggelassen werden.

Online-Beispiel

Ein HTML-Textbereich (textarea):

!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Grundlagen-Tutorial(oldtoolbag.com)</title> 
</head>
<body>
<textarea name="textarea" rows="10" cols="50">Schreiben Sie etwas hier</textarea>
</body>
</html>
Testen Sie es heraus ‹/›

Browser-Kompatibilität

IEFirefoxOperaChromeSafari

Alle gängigen Browser unterstützen den <textarea>-Tag.

Definition und Verwendungshinweise

Der <textarea>-Tag definiert ein mehrzeiliges Texteingabefeld.

Ein Textarea kann unendlich viele Texte enthalten, und der Standardfont der Texte ist ein Breitenschriftfont (normalerweise Courier).

Die Größe des Textareas kann durch die cols- und rows-Attribute festgelegt werden, aber ein besseres Verfahren ist die Verwendung der height- und width-Attribute von CSS.

HTML 4.01 mit HTML5unterschieden

HTML5 Fügte einige neue Eigenschaften hinzu.

Attribute

New: HTML5 new attributes.

AttributeValueDescription
autofocusHTML5autofocusSpecifies that the text area should automatically receive focus when the page is loaded.
colsnumberSpecifies the visible width of the text area.
disableddisabledSpecifies that the text area should be disabled.
formHTML5form_idDefines one or more forms that the text area belongs to.
maxlengthHTML5numberSpecifies the maximum number of characters allowed in the text area.
nametextSpecifies the name of the text area.
placeholderHTML5textSpecifies a short hint that describes the expected value for the text area.
readonlyreadonlySpecifies that the text area should be read-only.
requiredHTML5requiredSpecifies that the text area is required./Required.
rowsnumberSpecifies the number of visible lines in the text area.
wrapHTML5hard
soft
Specifies how the text in the text area should be wrapped when a form is submitted.

Global Attributes

<textarea> Tag Supports Global Attributes of HTML.

Event Attributes

<textarea> Tag Supports HTML Event Attributes.

Related Articles

HTML DOM Reference Manual:Textarea Object