Skip to content
Related Articles

Related Articles

Improve Article
HTML | <input> placeholder Attribute
  • Last Updated : 09 May, 2019

The <input> placeholder attribute in HTML is used to specify the expected value to be displayed before user input in the input element.


<input placeholder="text"> 

Attribute Values: This attribute contains a single value text which specifies a short hint that describes the expected value of the input field.

Example: This Example illustrates the use of Placeholder attribute in <input> element.

<!DOCTYPE html>
        <h1 style="font-size:25px;font-style:italic;">
        <h2 style="font-size:25px;font-style:italic;">
          HTML input Placeholder Attribute
        <form action=" ">
            <input type="text"
                   placeholder="First name">
            <input type="text"
                   placeholder="Last name">
            <input type="submit" 


Supported Browsers: The browser supported by HTML <input> Placeholder Attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Recommended Articles
Page :