selectors
combinatiors
A CSS selector can contain more than one simple selector. Between the simple
selectors, we can include a combinator.
There are four different combinators in CSS:
1)descendant selector (space) The descendant selector matches all elements that are
descendants of a specified element.
-----------------------------------------------------------------------------------
---------------------------------------------------------------------------------
2)child selector (>)
The child selector selects all elements that are the children of a specified
element.
-----------------------------------------------------------------------------------
---------------------------------------------------------------------------------
3)adjacent sibling selector (+)
The adjacent sibling selector is used to select an element that is directly after
another specific element.
Sibling elements must have the same parent element, and "adjacent" means
"immediately following".
-----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
4)general sibling selector (~) The general sibling selector selects all elements
that are next siblings of a specified element.
E1~E2 ALL THE E2 TYPE OF ELEMENTS WHICH ARE SIBLINGS OF E1 THPE OF ELEMENTS
div~p
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
5) universal selector *