Structural pseudo-classes, combinators, attribute selectors, generated content, interactive states, and typographic pseudo-elements.
:nth-child(odd) tints alternate rows; :nth-child(3n) recolors every third.
>) — tintedElement A
Adjacent sibling of A (+) — red
General sibling of A (~) — green
Another general sibling — green
Secure link — gets a lock via [href^="https"]
Report — gets a (pdf) tag via [href$=".pdf"]
Opens in new tab — dotted underline
Active / Off — styled by data-state
Featured product
Generated quotation marks wrap this text.
Items in cart
The first line of this paragraph is bold and blue, and the very first letter is enlarged as a floated drop-cap. Resize the window to confirm that ::first-line tracks the actual rendered first line rather than the source markup. Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do eiusmod.
Select this text with your cursor — the highlight should be purple-on-white via ::selection.