Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | input maxlength Attribute

  • Last Updated : 23 Aug, 2019

The <input> maxlength attribute is used to specify the maximum number of characters enters into the <input> element.


Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

<input maxlength="number">

Attribute Value:

  • number: It contains single value number which allows the maximum number of character in <input> element. Its default value is 524288.


<!DOCTYPE html>
        HTML input maxlength Attribute
        <h1 style="color:green;"
            HTML <input> maxlength Attribute
        <form action="#">
            <input type="text"
            <br> Password:
            <input type="text" 
            <input type="submit" 


Supported Browsers: The browsers supported by input maxlength Attribute are listed below:

  • Google Chrome 1.0
  • Internet Explorer 2.0
  • Firefox 1.0
  • Safari 1.0
  • Opera 1.0

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!