EN
HTML - password input
0 points
In this article, we would like to show you how to create and use the password input element in HTML.
Quick solution:
xxxxxxxxxx
1
<label>
2
<span>Password:</span>
3
<input type="password" name="input-name" />
4
</label>
In this example, we create password input using the input
element's type="password"
attribute. Additionally, we specify that the password in the form
is required
to be filled and we set it's minimum length using minlength
.
xxxxxxxxxx
1
2
<html>
3
<body>
4
<form>
5
<label>
6
<span>Password:</span>
7
<input type="password" name="input-name" minlength="5" required />
8
</label>
9
</form>
10
</body>
11
</html>