how to show asterisk password code in html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

how to show asterisk password code in html

3rd Sep 2017, 6:15 AM
Dharmesh Shukla
Dharmesh Shukla - avatar
6 Answers
+ 6
Not recommended, even if you can fake a standard text input, it lacks the security features inbuilt into the password input. There's no easy way for this, more on this you can find in the following: https://stackoverflow.com/questions/1648665/changing-the-symbols-shown-of-a-html-password-field Hth, cmiiw
3rd Sep 2017, 6:56 AM
Ipang
+ 5
It's a password type input that's why Michelle's code strip works
3rd Sep 2017, 6:19 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 3
normally in password code generate by dot but i want in password field in star
3rd Sep 2017, 6:21 AM
Dharmesh Shukla
Dharmesh Shukla - avatar
+ 3
You could use a text input instead of a password type and then use some css and javascript to change the characters in the field as the user types, but this is not a good idea for security purposes. (say if the user had a user defined css stylesheet for their browser or had JS turned off) The browser itself will also provide more security for a password type over a text type input. Also, users are used to seeing the "dot" when typing their passwords into a site, so it is typically the most accepted form of masking for a password field. The only way I know how to change the style to an asterisk is to create a new font for each letter code and to do a bit of a hack using @font-face with your newly created font and then setting your font-family and font-size inside: input[type=password] {} Search the internet if you really want to go that far with this.
3rd Sep 2017, 6:38 AM
ChaoticDawg
ChaoticDawg - avatar
+ 2
no this is doesn't show as asterisk password
3rd Sep 2017, 6:20 AM
Dharmesh Shukla
Dharmesh Shukla - avatar
+ 1
this is normal form code
3rd Sep 2017, 6:18 AM
Dharmesh Shukla
Dharmesh Shukla - avatar