Applies one or more styles to the element that is the nth sibling of its type.
An expression that selects every n sibling elements.
Value that specifies one or more Cascading Style Sheets (CSS) attribute/value pairs.
The :nth-of-type(n) pseudo-class is a structural pseudo-class. Structural pseudo-classes enable selection based on extra information in the document tree that can't be selected using simple selectors or combinators.
The expression that determines which elements will be selected can take one of the following forms:
even selects even-numbered instances of the element.
odd selects odd-numbered instances of the element.
a n+ b selects every a instances of the element, starting from the a+b instance.
a n- b selects every a instances of the element, starting from the a-b instance.
The :nth-child pseudo-class is a structural pseudo-class. Structural pseudo-classes enable selection based on extra information in the document tree that cannot be selected using simple selectors or combinators.
The following style rules insert curly braces before and after each occurrence of H1 in the document tree.
img:nth-of-type(2n+1) /* selects every other image, starting from the first image */ img:nth-of-type(4n-1) /* selects every fourth image, starting from the third image */ img:nth-of-type(3n+0) /* selects every third image, starting from the third image */
a, abbr, acronym, address, b, big, blockquote, body, caption, center, cite, code, col, colgroup, dd, dfn, dir, div, dl, dt, em, form, hn, html, i, img, input, input type=button, input type=checkbox, input type=file, input type=hidden, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, kbd, label, legend, li, listing, marquee, menu, ol, p, plaintext, pre, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp