Menu Home

focus

osbo.com | CSS | Pseudo-Classes | focus

The focus CSS pseudo-class applies while an element has the focus.

Syntax

selector:focus {
    property: value;
}

Examples

Internal

focus-within

External

World Wide Web Consortium (W3C)