Default Option :default
The :default pseudo-class matches all UI elements that are default among a set of similar elements. For example, the default button in a form, or the initially selected <option> in a <select> element.
Browser Support
| Chrome | Firefox | Safari | Opera | IE | Edge | |
|---|---|---|---|---|---|---|
| Desktop | yes | yes | yes | yes | no | no |
| Mobile | yes | yes | yes | yes | no | no |
Syntax
E:default {
/* Style properties */
}
Example
/* In this example, any default UI elements will have a green background. */
:default {
background-color: green;
}
Information is based on Selectors Level 4 - W3C Working Draft (last updated on May 2, 2013)
Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.