HTML Text box with gray text

Hello Experts,

How do I do HTML Textboxes where there's a default "Type here" text in grey, but as soon as the user sets focus in it, this disappears and the text typed by the user is black?

APD TorontoAsked:
Who is Participating?
COBOLdinosaurConnect With a Mentor Commented:
For HTML5 on modern browsers you can use a placeholder:

<textarea placeholder="your text here..."
<input type="text" placeholder="your text here..."

old browsers nothing you can do to simulate it unles you want to hack it with: 

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.