HTML maxlength Attribute
It specifies the maximum number of characters that have been allowed in the Element.
It can be used on the following Elements:
Attribute Values: It contains a single value number that allows the maximum number of characters in the <input> element. Its default value is 524288.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
- Example for <input> element:
- Example for <textarea> element:
Supported Browsers: The browsers supported by maxlength attribute are listed below:
- Google Chrome
- Internet Explorer