From W3C Wiki
< CSS‎ | Selectors
Revision as of 20:48, 26 September 2011 by Hiroki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Pseudo-classes :checked

The :checked pseudo-class represents input elements(only for checkboxes or radio buttons) that are in an enabled state.


:checked{ properties }



 input:checked + label{
   font-weight: bold;


  <input type="radio" id="m" name="gender" value="male">
  <label for="m">male</label>
  <input type="radio" id="f" name="gender" value="female">
  <label for="f">female</label>

Css3 selectors checked.png

CSS defines the :checked pseudo-class in The :checked pseudo-class.