The placeholder attribute is applied to an input field in order to display optional hint text that is visible when the field has no value. Entering a value into the field causes the placeholder text to disappear until the input value is removed.
Syntax:
<input type="text" name="query" placeholder="Enter a search query..." />
Elements:
Example
The placeholder attribute example:
Comments
No comments have been made yet.
Please login to leave a comment. Login now