Horje

How to add HTML <textarea> maxlength Attribute with label Tag

Definition and Usage

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


Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

Syntax

<textarea maxlength="number">

Attribute Values

Value Description
number The maximum number of characters allowed in the text area
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The textarea maxlength attribute</h1>
<label for="text">Type</label><br>
<textarea rows="4" cols="50" maxlength="50">
Enter text here...</textarea>

</body>
</html>

Output should be:

How to add HTML <textarea> maxlength Attribute with label Tag




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin