Easy Tutorial
❮ Att Textarea Name Att Command Icon ❯

HTML <textarea> maxlength Attribute

HTML <textarea> Tag

Example

A text area with a maximum length of 50 characters:


Browser Support

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.

Apart from Internet Explorer and Opera, other major browsers support the maxlength attribute.


Definition and Usage

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


Differences Between HTML 4.01 and HTML5

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


Syntax

Attribute Values

Value Description
number The maximum number of characters allowed in the text area.

❮ Att Textarea Name Att Command Icon ❯