:default
Widely availableSince 202097% of users
A pseudo-class that targets form elements (like buttons or checkboxes) that are the default among a set of similar elements.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since January 2020. Widely available since July 2022.
See how modern your own CSS is.Check your CSS →
Quick example
button:default {
/* Highlights the primary/default button in a form */
outline: 2px solid #3b82f6;
font-weight: bold;
}:default browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
10+
4+
5+
79+Mobile
18+Android
4+Android
5+iOS