<!DOCTYPE html>
<html>
<head>
<style>
label {
display: block;
margin-top: 10px;
}
input[type=radio]:default {
box-shadow: 0 0 5px 3px blue;
}
input[type=checkbox]:default {
box-shadow: 0 0 5px 3px maroon;
}
option:default {
color: blue;
background-color: pink;
}
</style>
</head>
<body>
<h1>Demo of :default</h1>
<p>The :default selector selects the default form element in a group of related elements.</p>
<p>The "male" radio button and the "bike" checkbox are checked by default:</p>
<form>
<p>Select gender:</p>
<label><input name="gender" type="radio" value="male" checked> Male</label>
<label><input name="gender" type="radio" value="female"> Female</label>
<label><input name="gender" type="radio" value="other"> Other</label>
<p>Select transport:</p>
<label><input name="bike" type="checkbox" checked>I have a bike</label>
<label><input name="car" type="checkbox">I have a car</label>
<p>Select favorite color:</p>
<select name="color" id="color">
<option value="opt1">Red</option>
<option value="opt2" selected>Green</option>