The placeholder attribute is added for input in HTML5. Provide a placeholder on input to display the prompt information (hint) of the expected value of the input field in text. This field will be displayed when the input is empty
The placeholder property is a new property in HTML5, commonly known as placeholder. Its function is similar to when the input box gets focus, the default value of the time surface will become blank, and the default text will be displayed when the focus is lost. I think everyone must have used js/jquery to create such an effect. Currently, it is only supported in modern browsers such as Mozilla Firefox 3.7+, Apple Safari 4+, Google Chrome 4+, Opera11+, etc.
The placeholder attribute is added for input in HTML5. Provide a placeholder on input, which displays the hint of the expected value of the input field in text, which will be displayed when the input is empty.
Example:
Copy the code