input:focus { background-color: yellow; } Source: http://www.w3schools.com/cssref/sel_focus.asp PrevNext