I want to create a simple input form for a username / password, and I was wondering if it is possible to simulate the functionality that many websites offer, namely a temporary line in text input showing what the purpose of the field is. Essentially, I need something like this:

When the user has not yet focused on typing, he should display "USERNAME" in a different format. When the user focuses on the text field, the field is cleared, the focus is set and the style changes. Is there any way to make this easy?
source share