Skip to content

Instantly share code, notes, and snippets.

@emmabostian
Created August 7, 2019 20:41
Show Gist options
  • Save emmabostian/f36cc8ff29b79b1392953efbc92f55ea to your computer and use it in GitHub Desktop.
Save emmabostian/f36cc8ff29b79b1392953efbc92f55ea to your computer and use it in GitHub Desktop.
Descendant selector: You can use a space to denote a descendant selector. This matches all elements which are descendants of a specified element.
Child selector: Use a greater than symbol (>) to select all elements that are immediate children of a specified element.
Adjacent sibling selector: Use a plus sign (+) to select all elements that are adjacent siblings of a specified element. They must have the same parent and immediately follow this element.
General sibling selector: Use a tilde (~) to select all elements that are siblings of an element.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment