The :focus pseudo class in CSS is used for styling an element that is currently targeted by the keyboard, or activated by the mouse.
Most commonly inputs and textarea are in “focus” when they are selected and ready to enter text like when a cursor is blinking. Mouse users can click them or their related label to focus, and keyboard users can TAB into them.