The placeholder Attribute

The placeholder Attribute

//an input field with a placeholder text

<input type="text" name="fname" placeholder="First name">
  • Specifies a hint that describes the expected value of an input field (a sample value or a short description of the format).
  • The hint is displayed in the input field before the user enters a value.
  • Works with the following input types: text, search, url, tel, email, and password.

Related concepts

The placeholder Attribute — Structure map

Clickable & Draggable!

The placeholder Attribute — Related pages: