This page demonstrates the following rule which should make a form input element turn red on yellow when it receives focus:
input:focus { background-color: yellow; color: red }
Use your browser's View Source option to see the full source code.
View Source