Selector Type
1.ID Selector
<div id= "One" ></div>
#one {}
2. Class Selector
<div class= "One" ></div>
. one{}
3. Tag Selector
<div>dsd</div>
div{}
4. Universal Selector
*{} All
Div * Div descendant of all elements
5. Nested selectors
Div.one
<div class= "One" ></div>
6. Combo Selector
Div,.one, #two {}
7. Descendant Selector
Space descendants
DIV *
> Descendants
+ Next Sibling node
Div+p
Div
P Pick This
Span
P
~ All the Brothers after
Div~p
Div
P
Span
P
All of them are chosen.
P SPAN P
8. Property Selector
Selector with a property [one] [title], etc.
[Key=value] Property name = Label of property value
Div[title=hello]
<div title= "Hello" ></div>
[Key^value] Selects the property name and the property value begins with
Div[title^=o]
<div title= "One" ></div>
<div title= "both" ></div>
[Key$=value] Select the property name that ends with value
[Key*=value]
Select the property name and include the value of the
[Key~=value]
Select the property name and have a value of
For Class-Selected
9. Pseudo-Class selectors
Includes descendant selector, state selector, pseudo element selector
CSS selector types