:default
A pseudo-class that targets form elements (like buttons or checkboxes) that are the default among a set of similar elements.
Syntax
/* Usage Example */
button:default {
/* Highlights the primary/default button in a form */
outline: 2px solid #3b82f6;
font-weight: bold;
}
:default Browser support
Widely available
Since
2020 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.
10+
4+
5+
79+