Show hint in HTML 5 text fields

Posted . Visible to the public.

To have your text input field pre-filled in with some text that disappears as soon as the user selects it, use the attribute placeholder:

<input type="text" placeholder="User name here">

This will only work in recent browsers Show archive.org snapshot (IE >= 10, FF >= 4, Chrome >= 4, Safari >= 5, Opera >= 11.6).

Dominik Schöler
Last edit
License
Source code in this card is licensed under the MIT License.
Posted by Dominik Schöler to makandra dev (2012-06-20 14:37)