w3schools focus in html form to change background color code example Example: color background to input boxes on focus input:focus { background-color: yellow; }