HTML5 placeholder to replace jQuery watermark

HTML5 PlaceHolder:

With the introduction of HTML5 we have an option which is basically the replacement of manually created watermarks for textboxes and input texts. It is a very simple way of presenting watermark, below is a clear example:

<input type=”text” placeholder=”Enter Name Here”/>

Watch Live Demo Here

 

Replacing Jquery Watermark:

For an example of jQuery Watermark, please view an older post explaining how to Create a textbox watermark using css and jquery

 

The Difference:

Watermark text dissappears as soon as the mouse click event is fired, while when using html5 placeholder the text dissappears as soon as you start typing. Will not state which is better since it is a matter of personal preference…
Thanks and Enjoy 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s