The :optional selector selects form elements which are optional. Form elements with no required attribute are defined as optional

:optional {
    css declarations;
}
input:optional {
   border:1px dotted #3366ff;
   background: #ffff99;
}

Click the button below to experiment with this selector.

Give it a Try!

4.0Firefox 10.0Explorer 10.0Chrome 5.0Safari 10.0Opera