HTML <input> placeholder Attribute

❮ HTML <input> tag


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


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



Attribute Values

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