Placeholder in html5

15 / May / 2011 by Umar 1 comments

HTML5 has made the page designing an easy task. Placeholder is input field improvement in html5. Things that we were doing in past using combination of HTML and client side scripting language can be done in HTML5 using an attribute. One of the example is placeholder attribute used with input type text which automatically puts the placeholder attribute value in the text field if it is empty. This placeholder text is cleared automatically on focus and on focus out either the entered text or the placeholder value (if nothing was entered) is displayed.

html form
<input name="fieldname" placeholder="Enter any keyword">
<input type="submit" value="Search">

Support browser

IE Firefox Safari Chrome Opera
. 3.7+ 4.0+ 4.0+ 11.0+

comments (1 “Placeholder in html5”)

  1. Many Halseth

    Each time I see blogs as beneficial as this for the reason that I need to cease bludging and commence operating on mine.Thanks


Leave a Reply

Your email address will not be published. Required fields are marked *