In CSS we use selectors to style elements on a webpage. There are many different selectors that can target HTML elements by their ID, class, attribute, type etc.
Here is a complete reference of all CSS selectors.
- CSS – Type selector
- CSS – Descendant selector
- CSS – Child selector
- CSS – #id selector
- CSS – Class (.) selector
- CSS – Universal (*) selector
- CSS – [attribute=value] selector
- CSS – [attribute~=value] selector
- CSS – [attribute*=value] selector
- CSS – [attribute|=value] selector
- CSS – [attribute^=value] selector
- CSS – [attribute$=value] selector
- CSS – :first selectors