pseudo-class

:default — CSS reference

Matches default controls, such as a checkbox whose checked attribute establishes its initial checked state. This can differ from the current :checked state after interaction.

Formal Syntax & Structure

css syntaxcss
:default

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS reference lab</title><style>#a,#b {color:#202020} #a:default {color:#006050}</style><body><label><input id="a" type="checkbox" checked>Default</label><label><input id="b" type="checkbox">Other</label><script>a.checked=false;</script></body></html>
CSS Reference