Articles → HTML 5 → Placeholder attribute in HTML5

Placeholder attribute in HTML5






Purpose





Syntax


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



Example


<!DOCTYPE html>
<html lang="en">
   <head>
      <title></title>
   </head>
   <body>
      <form>
         <input type="text" placeholder="Enter your name here" />
      </form>
   </body>
</html>



Output


Picture showing the output of Placeholder attribute  in HTML5

Click to Enlarge


Browser support


Internet ExplorerFirefoxChromeSafariOperaEdge
10.04.010.05.011.0Yes



Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, November 21, 2018

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250