CSS

Selectors

Selector Description
div span Select any span tag inside a div tag
div > a Select any a tag that is a direct child of a div tag
div+a Select any a tag that is immediately after a div tag
div,a Select all a tags and all div tags
div a:first-child Select the first a tag inside a div tag
tr:nth-child(2n+0) Select every other row of a table starting with the first row
tr:nth-child(3n+1) Select every 3rd row of a table starting with the second row
a:nth-of-type(4) Select every a tag that is the 4th element of its parent
a:nth-last-of-type(4) Select every a tag that is the 4th to last element of its parent
input:disabled Select every input tag that is currently disabled
input[type=”checkbox”]:checked Select every checkbox that is currently checked
div:not(.fantastic) Select every div tag that doesn’t have the class fantastic
:not(h1) Select everything that’s not an h1 tag