CSS3 Selector
s
CSS selectors ar used to "find" (or select) the HTML elements you
wa nt to style
We can divide CSS selectors into five categories:
•Simple selectors (select elements based on name, id, class)
•Combina tor selectors (select elements based on a specific
relationship between them)
• Pseduo-c lass selector s (select elements based on a
certain state)
• Pseudo-elements selector s (select and style a part of an
element)
•Attribute selectors (select elements based on an attribute or
attribute va lue)
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 elem ent, and
"adja cent" means "immedia tely following". The following
example selects the first <p> element that are placed
immediately after <div> elements: