:focus {
    /* ... */
}
<form>
    <fieldset>
        <legend>Enter your name.</legend>
        <label for="user-name">Name</label>
        <input type="text" id="user-name" placeholder="Enter your name...">
    </fieldset>
</form>
fieldset {
    padding: 1em;
}
input:focus { /* Selects the element while it has focus. */
    background-color: yellow;
}
Rendered Output - Try It Yourself! When you focus the <input> tag to enter a name, its background turns yellow.
:focus {
    outline: none;
}