Horje

How to run An <input> element with type="password" that must contain 6 or more characters - HTML pattern Attribute

Password Example. The input pattern attribute. A form with a password field that must contain 8 or more characters.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The input pattern attribute</h1>

<p>A form with a password field that must contain 8 or more characters:</p>

<form action="/action_page.php">
  <label for="pwd">Password:</label>
  <input type="password" id="pwd" name="pwd" pattern=".{8,}" title="Eight or more characters">
  <input type="submit">
</form>

</body>
</html>

Output should be:

How to run An <input> element with type="password" that must contain 6 or more characters - HTML pattern Attribute




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