Skip to content
Related Articles

Related Articles

HTML | minlength Attribute

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 07 Jul, 2021

The HTML minlength attribute is used to specify the minimum number of characters (as UTF-16 code) the user enters into the input field or text area. Integer value must start with 0 or higher.


<Element minlength="numeric">


  • <input>
  • <textarea>

Attribute Value:  

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



<!DOCTYPE html>
        HTML | minlength Attribute
<body style="text-align: center;">
    <h1 style="color:green;">
    <h2>minlength attribute</h2>
    <form action="">
        <input type="text"
        <input type="text"
        <input type="submit"


Supported Browsers: The browser supported by HTML minlength attribute are listed below:  

  • Apple Safari 
  • Google Chrome 
  • Firefox 
  • Opera 
  • Internet Explorer 


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!