Advertisement
Home Open Editor ❯

HTML <textarea> maxlength Attribute

Example

<form action="action.php">
  <textarea maxlenght="15" name="textareaText">Hello world!</textarea>

  <input type="submit" value="Submit">
</form>

Try this code ❯

Meaning

The maxlength attribute specifies the maximum number of characters (UTF-16 code units) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters.


Standard Syntax

<textarea maxlength="number"> ... </textarea>


Advertisement

Attribute Values

Value Description
number Specifies the maximum number of characters allowed in the text area.
Home Open Editor ❯
Advertisement