Open In App

HTML | <Textarea> minlength Attribute

Last Updated : 16 Jun, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

The HTML <Textarea> minlength Attribute is used to define the minimum number of characters (as UTF-16 code units) of a Textarea Element. The Integer value must start with 0 or higher. 
Syntax: 
 

<Textarea minlength="numeric"> 


Attribute Value: 
 

  • number: It contains the numeric value i.e 0 or higher.


Example: 
 

html
<!DOCTYPE html>
<html>

<body>
    <center>
        <h1 style="color:green;"> 
        GeeksforGeeks 
        </h1>
        <h2> 
       Textarea minlength attribute 
        </h2>
        <textarea rows="4" 
                  cols="50"
                  minlength="6">
            write here something that you want...
        </textarea>
    </center>
</body>

</html>

Output: 
 


Supported Browsers: The browsers supported by <Textarea> minlength Attribute are listed below: 
 

  • Google Chrome 40.0 and above
  • Edge 17.0 and above
  • Firefox 51.0 and above
  • Internet Explorer not supported
  • Opera 27.0 and above
  • Safari 10.1 and above

Next Article

Similar Reads