placeholder attribute

<input placeholder ='value'>


Placeholder attribute by default shows the example value in the input field.
It is used to provide idea or intimate the user to enter value related to the hint.

Example Code:

Result :

Fill up the below fields:

  • When the input field is empty, the hint i.e. text is displayed.
  • The default text in the input fields gets vanished, when user enters value in the fields.
  • Alphabetical and numerical characters can be entered in the input fields.


It will function in all the browsers, except Internet Explorer.

Ask Questions

Ask Question