Horje

How to add HTML <input> minlength Attribute

An <input> element with a minimum length of 8 characters:

Definition and Usage

The minlength attribute specifies the minimum number of characters required in an input field.

Note: The minlength attribute can be used with input type: text, search, url, tel, email, and password.


Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

Syntax

<input minlength="number">

Attribute Values

Value Description
number The minimum number of characters required in an <input> element
index.html
Example: HTML
<input type="password" id="password" name="password" minlength="8">

Output should be:

How to add HTML <input> minlength Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin