CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise


CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS :optional Selector

CSS :optional Selector



The :optional selector is used to selecting form elements that are optional. Those elements are called optional and do not have the required attribute. It is only applicable to input, select, and Textarea elements.




Its syntax is:-
:optional {
  css declarations;

Code Explanation

All Tutorials related to CSS Selectors

All Sections related to CSS