Check out example codes for "html textarea background text". It will help you in understanding the concepts better.

Code Example 1

<textarea rows="5" cols="30" placeholder="enter optional message">

Learn ReactJs, React Native from akashmittal.com