Home>Article>Web Front-end> How to hide password in html

How to hide password in html

醉折花枝作酒筹
醉折花枝作酒筹 Original
2021-06-03 11:04:14 10962browse

In HTML, you can use the type attribute to hide the password. You only need to add the "type="password"" code to the input element. The type attribute specifies the type of the input element. When the value is password, it means defining a password field. Characters in this field are masked.

How to hide password in html

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

The input tag is used to collect user information. Input fields can take many forms depending on the value of the type attribute. Input fields can be text fields, checkboxes, masked text controls, radio buttons, buttons, etc.

The type attribute specifies the type of the input element. The value is password, and the password can be hidden.

Syntax:

type is used to specify the input attribute, and name is used to specify The label of this form item

Example:

  

Email:

password:

请单击确认按钮,输入会发送到服务器上名为 "form_action.asp" 的页面。

Effect:

How to hide password in html

##Extension:

type attribute value

How to hide password in html

Recommended learning:

html video tutorial

The above is the detailed content of How to hide password in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn