CSS :default Selector Last Updated : 29 Aug, 2024 Comments Improve Suggest changes 2 Likes Like Report The :default selector is used to set a default element in a group of same type of element in a form. This selector is used on button, option, radio button and check-box. Syntax::default { //property}Example: HTML <!DOCTYPE html> <html> <head> <style> input[type="checkbox"]:default { box-shadow: 0 0 1px 1px gray; } </style> </head> <body> <h3>Select Language</h3> <form action=""> <input type="checkbox" name="lan" value="c" checked> C <br> <input type="checkbox" name="lan" value="c++"> C++ <br> <input type="checkbox" name="lan" value="java"> Java <br> <input type="checkbox" name="lan" value="c#"> C# <br> <input type="checkbox" name="lan" value="python"> Python <br> <input type="checkbox" name="lan" value="javascript"> JavaScript <br> </form> </body> </html> Output: Supported Browsers:Google Chrome 10.0Edge 79.0Firefox 4.0Safari 5.0Opera 10.0 Create Quiz Comment V Vishal_Khoda Follow 2 Improve V Vishal_Khoda Follow 2 Improve Article Tags : Misc Web Technologies CSS CSS-Selectors Explore CSS Introduction 3 min read CSS Syntax 3 min read CSS Selectors 6 min read CSS Comments 2 min read CSS Colors 5 min read CSS Borders 5 min read CSS Margins 4 min read CSS Height and Width 4 min read CSS Outline 4 min read CSS Fonts 4 min read Like