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

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <textarea> maxlength-Eigenschaft

Die maxlength-Eigenschaft legt die maximale Länge des Textfelds (in Zeichen) fest. Die maxlength-Eigenschaft ist ein HTML5 The new attribute of the <textarea> tag in the syntax.

 HTML <textarea> Tag

Online-Beispiel

Ein Textfeld mit einer maximalen Länge von60 Zeichen:

<textarea maxlength="60">
Geben Sie hier Text ein...
</textarea>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Internet Explorer 10, Firefox, Chrome and Safari support the maxlength attribute.

Note:Opera or Internet Explorer 9 and earlier versions do not support the maxlength attribute of the <textarea> tag.

All major browsers except Internet Explorer and Opera support the maxlength attribute.

Definition and Usage

The maxlength attribute specifies the maximum length of the text area (in characters).

HTML 4.01 and HTML5Difference between

The maxlength attribute is an HTML5 The new attribute of the <textarea> tag in the syntax.

Syntax

<textarea maxlength="number">

Attribute Value

ValueDescription
numberThe maximum number of characters allowed in the text area.
 HTML <textarea> Tag