:default

A pseudo-class that targets form elements (like buttons or checkboxes) that are the default among a set of similar elements.

/* Usage Example */
button:default {
  /* Highlights the primary/default button in a form */
  outline: 2px solid #3b82f6;
  font-weight: bold;
}
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+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC