change border color when input is clicked html code example Example: change input border color when selected input:focus { outline: none; border: 1px solid red; }