Open In App

HTML | <input> minlength Attribute

The HTML <input> minlength Attribute is used to define <input> minlength Attribute. the Integer value must start with 0 or higher. 
Syntax: 
 

<input minlength="numeric"> 

Attribute Value: 
 



Example: 
 




<!DOCTYPE html>
<html>
 
<body>
    <center>
        <h1 style="color:green;">
        GeeksForGeeks
        </h1>
        <h2>
        minlength attribute
        </h2>
        <form action="">
            Username:
            <input type="text"
                   name="username"
                   minlength="10">
            <br>
            <br> Password:
            <input type="text"
                   name="password"
                   maxlength="10">
            <br>
            <br>
            <input type="submit"
                   value="Submit">
        </form>
    </center>
</body>
 
</html>

Output: 
 



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

 

Article Tags :