coderef

:defaultBaseline · Widely available

The :default CSS pseudo-class matches the default element in a group of related form controls, such as checkboxes and radio buttons with the checked attribute.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.

Browser support

DesktopChrome
1–9Not supported
10+Supportedsince Mar 8, 2011
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–3.6Not supported
4+Supportedsince Mar 22, 2011
Current: 157
Safari
1–4Not supported
5+Supportedsince Jun 7, 2010
Current: 27
MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155
Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157
Safari iOS
1–4.2Not supported
5+Supportedsince Oct 12, 2011
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: :default.

Feature detection

CSS · check before using
@supports selector(:default) {
  /* styles that use :default */
}

/* or in JavaScript */
if (CSS.supports("selector(:default)")) {
  // use it
}