
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How do we take password input in HTML forms?
To take password input in HTML form, use the <input> tag with type attribute as a password. This is also a single-line text input but it masks the character as soon as a user enters it.
Example
You can try to run the following code to take password input in HTML forms −
<!DOCTYPE html> <html> <body> <head> <title>HTML Forms</title> </head> <p>Add your details:</p> <form> Student Username:<br> <input type="text" name="name"> <br> Password:<br> <input type="password" name="password"> <br> </form> </body> </html>
- Related Questions & Answers
- How to take user input using HTML forms?
- How do we reset all the input fields in HTML forms?
- How do we use radio buttons in HTML forms?
- How do we use checkbox buttons in HTML forms?
- How do we send an email using HTML forms?
- Why do we use reset button in HTML forms?
- HTML DOM Input Password object
- How do we upload external file on a website using HTML forms?
- How to clear all the input in HTML forms?
- How we can group data in HTML forms?
- HTML DOM Input Password autofocus Property
- HTML DOM Input Password defaultValue Property
- HTML DOM Input Password disabled Property
- HTML DOM Input Password form Property
- HTML DOM Input Password maxLength Property
Advertisements