placeholder Attribute
The placeholder attribute provides to describe the expected value of an input field.Note: The placeholder attribute works with the following <input> types: text, search, url, telephone, email, and password
The hint is displayed in the input field when it is empty, and disappears when the field gets focus:
Syntax
<input type="search" name="user_search" placeholder="Search HTML5 demos and examples" />
Example
<!DOCTYPE html>
<html>
<body>
<form action="demo_form.asp" method="get">
<input type="search" name="user_search" placeholder="Search HTML5 demos and examples" />
<input type="submit" />
</form>
</body>
</html>
<html>
<body>
<form action="demo_form.asp" method="get">
<input type="search" name="user_search" placeholder="Search HTML5 demos and examples" />
<input type="submit" />
</form>
</body>
</html>
No comments:
Post a Comment