A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/how-do-we-take-password-input-in-html-forms/ below:

How do we take password input in HTML forms ?

How do we take password input in HTML forms ?

Last Updated : 01 Jun, 2023

In this article, we learn how to create a password input field in HTML. This can be done by using the <input> tag with type attribute which is set to the value "password".  It involves sensitive information about the data of the user. The text in the input password field will be changed into bullets in the view of hiding from the third party. 

Syntax 

<input type="password">

Example: In this example, we will use a type attribute that is set as a password.

HTML
<!DOCTYPE html>
<html>
<head>
    <title>
        How do we take password input in HTML forms?
    </title>
</head>
<body style="text-align:center;">
    <h1 style="color:green;">
        GeeksForGeeks
    </h1>
    <h2>How do we take password input in HTML forms? </h2>
    <h4>
        <br>
        Email:<input type="email" 
                     id="myemail"><br>
        Password:<input type="password" id="mypasswd" 
                        value="geeks12">
    </h4>
</body>
</html>

Output 



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4