0

What is the usage of placeholder in html?

You can go for details

3rd Oct 2021, 8:03 AM
Ahmad Yasir Tasal
Ahmad Yasir Tasal - avatar
2 Respuestas
+ 4
Placeholder is used to provide information about what to enter inside the input section. If there's just an empty box, the user might not know what to enter there. So, placeholders give information about the stuff that should be entered there. For example, if there's a placeholder like, "username", we'll know that we have to enter username there. So that why placeholders are used. But once the input is given, the placeholder disappears so that our input takes the place.
3rd Oct 2021, 8:26 AM
Rishi
Rishi - avatar
+ 2
The placeholder attribute (where supported), was meant to provide a visual clue, what information was expected to be entered into a form entry. It's one of the new attributes introduced with HTML5. https://www.w3schools.com/TAGS/att_input_placeholder.asp
3rd Oct 2021, 8:24 AM
Ipang