Categories
HTML

How to make an HTML text box show a hint when empty?

Spread the love

To make an HTML text box show a hint when empty, we set the placeholder attribute.

For instance, we write

<input name="email" placeholder="Email Address" />

to set the placeholder attribute to Email Address to show that as the placeholder when the input is empty.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

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