
The MO Label Inside module offers this functionality for all of your Drupal text field input elements.
The functionality requires JavaScript. Since nothing is changed in the Drupal form sent out, users who do not have JavaScript see the normal form. The JavaScript initialization takes care of properly transforming the elements as soon as possible.
We know that there is a way to get the same basic functionality using CSS. But since that does not work right with all browsers1 and we prefer solutions that work with all browsers, we created this module instead. Plus, we give you a lot more functionality (see Technical features below.)
The module gives you a way to change the labels of your text field input elements. This means you can change those to your liking without having to hack Drupal.
For example, the user log in screen asks for a Username and a Password. You could change those terms with: Log In Name and Pass Phrase.
Another side effect, you are given a way to change the color of the words in the label. This means you can make the colors better match your theme or that specific page. You would otherwise have to edit your CSS file by hand...
We felt that if we could just copy and paste a few strings from one website to another, it would make it a lot easier to move many labels inside their respective text field input elements. Doing such work by hand on each website is prone to errors, and therefore it is likely to not get done simply because it's too much trouble to debug a feature like this each time.
With the MO Label Inside module, all you have to do is enter a few lines defining the text field input elements that you want to transform in this way and your done. You can even use the asterisk (*) wildcard to transform all the input elements.