English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The maxlength attribute specifies the maximum length of the text area (in characters). The maxlength attribute is an HTML5 The new attribute of the <textarea> tag in the syntax.
A text area with a maximum length of60 characters:
<textarea maxlength="60"> Enter text here... </textarea>Test to see ‹/›
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.
Except for Internet Explorer and Opera, other mainstream browsers support the maxlength attribute.
The maxlength attribute specifies the maximum length of the text area (in characters).
The maxlength attribute is an HTML5 The new attribute of the <textarea> tag in the syntax.
<textarea maxlength="number">
Value | Description |
---|---|
number | The maximum number of characters allowed in the text area. |