HTML <input> placeholder Attribute

❮ HTML <input> tag

Example

<input type="text" id="fname" name="fname" placeholder="First Name">

Meaning

The placeholder attribute specifies a short bit of text that is used to help the user figure out what type of information to fill in for a form control.

The text will be placed in the field and cleared on entering.


Standard Syntax

HTML: <input placeholder="text">

XHTML: <input placeholder="text"/>



Browser Support

Note:




Status







Attribute Values

Value Description
text Specifies a text that specify the expected value of the input field be.
❮ HTML <input> tag