CSS selectors list
Simple Selectors
| Element Selector | Select html element using name | |
| Id selector | Select element using id attributes | |
| Class Selector | Select element using class attriubutes | |
| Universal Selector | To select all elements | |
| Grouping Selector | To select multiple element together |
Combinator Selectors
| Descendents Selector | Select all childrens of specified element(space) | |
| Child Selector | Select only direct child of specified element(>) | |
| Adjacent sibling selector | Select next neighbour of specified element (+) | |
| Sibling selectors | Select all neighbours of specified element (~) | |
Pseudo class selectors
| :active | Select item, when item is clicked | |
| :hover | Select item, when item hovered | |
| :link | Select item, when a link is applied | |
| :visited | Select item, when a link visited | |
| :checked | Select item, when checkbox checked | |
| :disabled | Select item, when item is disabled | |
| :empty | Select all elements that has no childrens | |
| :enabled | Select enabled input fields | |
| :focus | Select input field when focused | |
| :first-child | Select every element that is first child | |
| :last-child | Select every element that is last child | |
| :nth-child(n) | Select nth child |
Pseudo Elements
| ::first-letter | Select first letter of element | |
| ::first-line | Select first line of element | |
| ::before | Display content before the content of an element | |
| ::after | Display content after the content of an element | |
| ::selection | Apply css properties when text selected |