The :default pseudo selector will match the default in a group of associated elements, such as the radio button in a group of buttons that is selected by default, even if the user has selected a different value. input[type=”radio”]:default + label:after { content: ‘ (default)’; color: #999; font-style: italic; } The CSS above targets the
CSS
A class selector in CSS looks like this: .class { } The word “class” in that code above can be anything. It refers to the attribute on HTML elements. See the relationship between these two things: <a href=”#” class=”big-button”>Push Me</a> .big-button { font-size: 60px; } You can limit a class selector to a specific kind
A child selector in CSS is the “greater than” symbol, it looks like this: ol > li { margin: 5px; } It means “select elements that are direct descendants only”. In this case: “select list items that are direct descendants of an ordered list”. To illustrate: <ol> <li>WILL be selected</li> <li>WILL be selected</li> <ul> <li>Will
The :checked pseudo-class in CSS selects elements when they are in the selected state. It is only associated with input (<input>) elements of type radio and checkbox . The :checkedpseudo-class selector matches radio and checkbox input types when checked or toggled to an on state. If they are not selected or checked, there is no match. So when a