Horje
How to create HTML Input Type Password

<input type="password"> defines a password field:


How is looked HTML Input Type Password

index.html
Example: HTML
<form>
  <label for="username">Username:</label><br>
  <input type="text" id="username" name="username"><br>
  <label for="pwd">Password:</label><br>
  <input type="password" id="pwd" name="pwd">
</form>

Full Code Example of HTML Input Type Password

The input type="password" defines a password field:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>Password field</h2>

<p>The <strong>input type="password"</strong> defines a password field:</p>

<form action="/action_page.php">
  <label for="username">Username:</label><br>
  <input type="text" id="username" name="username"><br>
  <label for="pwd">Password:</label><br>
  <input type="password" id="pwd" name="pwd"><br><br>
  <input type="submit" value="Submit">
</form>

<p>The characters in a password field are masked (shown as asterisks or circles).</p>

</body>
</html>

Output should be:

Full Code Example of HTML Input Type Password





Category:
Web Tutorial
Sub Category:
HTML Input Types
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference