SET A PLACEHOLDER FOR AN INPUT FIELD

You can use the placeholder input attribute to insert a one-line text string into any text-based input field. When the form loads, supported web browsers will display this string in the input area with gray text and automatically clear it when the user attempts to type in a value. This is useful to provide a subtle description or formatting hints that the user is expected to follow in order to submit your form:

<input type='text' ... placeholder='text'>

The type attribute can be a text-based input type, such as text, telephone, url, email, and search. The placeholder attribute value appears as gray text in the input field itself, if supported. When the user clicks in the field, the placeholder text disappears, ...

Get HTML5: Your visual blueprint™ for designing rich web pages and applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.