Html 5 Form Placeholder Attribute Tag

The placeholder attribute is used to give initial value for input type field. When you focus curser that placeholder initial value disappear from input field.


<input type="" placeholder="" />

Example Code

<form action="" method="post">
  Name:<input type="text" name="name" id="name" placeholder="Sample Text" />
  <input type="submit" value="Submit" />

Out Put :

In the above example put placeholder attribute for the Name input type.

ScreenShot :