element |
p |
Selects all <p> elements |
https://www.w3schools.com/cssref/sel_element.php |
#id |
#firstname |
Selects the element with |
https://www.w3schools.com/cssref/sel_id.php |
* |
* |
Selects all elements |
https://www.w3schools.com/cssref/sel_all.php |
.class |
.intro p.intro |
Selects all elements with Selects all <p> elements with |
https://www.w3schools.com/cssref/sel_class.php |
[attribute] |
[lang] |
Selects all elements with a lang attribute |
https://www.w3schools.com/cssref/sel_attribute.php |
[attribute=value] |
[] |
Selects all elements with |
https://www.w3schools.com/cssref/sel_attribute_value.php |
[attribute~=value] |
[title~="flower"] |
Selects all elements with a title attribute containing the word "flower" |
https://www.w3schools.com/cssref/sel_attribute_value_contains.php |
[attribute|=value] |
[lang|="en"] |
Selects all elements with a lang attribute value equal to "en" or starting with "en-" |
https://www.w3schools.com/cssref/sel_attribute_value_lang.php |
[attribute^=value] |
[href^="https"] |
Selects all elements with a href attribute value that begins with "https" |
https://www.w3schools.com/cssref/sel_attr_begin.php |
[attribute$=value] |
[href$=".pdf"] |
Selects all elements with a href attribute value ends with ".pdf" |
https://www.w3schools.com/cssref/sel_attr_end.php |
[attribute*=value] |
[href*="w3schools"] |
Selects all elements with a href attribute value containing the substring "w3schools" |
https://www.w3schools.com/cssref/sel_attr_contain.php |
& |
& |
Applies styles for an element within the context of another element |
https://www.w3schools.com/cssref/sel_nesting.php |