When displaying with HTML forms, most modern browsers display placeholder values for textarea and input fields. Once you’ve added placeholder attributes to your form fields, you can style their appearance via CSS.

Style placeholders with CSS

Here are the CSS rules required to style placeholders for the various browsers that support them:

Of course the actual properties can be most anything you want; the ones used here are for example purposes only. Note that some properties require adding the !important declaration in order for them to be applied in good ’ol IE.