HTML Input Type Text
Using a value of text for the type attribute on an input field will display a single-line text box for user input. The default width of a text input field is 20 characters, but the width can be manipulated using CSS.
HTML Input Type Password
Using a value of password for the type attribute on an input field will display a single-line text box for users, but when a user types inside the input field, the characters will be replaced with asterisks (*) or dots (•). This is to provide users a secure way to enter their password.
Learn HTML & CSS Today
Get hands-on experience writing real code while you learn with interactive tutorials in our free online learning platform – no downloads or complicated setup required.
- Free and fun
- Designed for beginners
- No download or setup required