Password hide in HTMLIn this article, we will learn how to hide the password field in a form using HTML. At the beginning of this article, we will learn some HTML basics, <form> tag and password element. After that, we can understand this concept with some examples. What do you mean by HTML?HTML stands for Hypertext Markup language. The latest HTML version is HTML5. HTML is the standard markup language for building and designing web pages. In HTML, we can use various commands called tags. Tags are instructions that are embedded directly into the text of an HTML document. Each HTML tag specifies some action that the browser displays on a web page. <form> tag in HTMLIt is one of the important elements of HTML. The <form> tag consists of two mandatory attributes and some optional attributes. <Input> elementThe input element is used to insert various controls in the form, such as text boxes, files, passwords, emails, etc. The input element is applied in the form using <input> tag. <input type = "password" >Password can also be the part of the data entered in HTML forms. Instead of displaying original characters, either asterisk (*) or dots (.) are shown when a password is entered. Thus the entered characters are masked or hidden. To make a textbox that can hide the entered characters, the type attribute of <input> element should be set to "password." Syntax:All the attributes used with textbox are also supported by password input element. The various attributes used with <input type = "password" > are given below:
Let's explain the <input> element with the help of various examples: Example 1:Output: The output of this example is given below: Example 2:Output: The output of this example is given below: Next TopicHTML Calculator |