Pseudoselectors

a:hover

a:visited

a:link = unvisited link

p:first-child = paragraphs that are the FIRST CHILD of their parents (not the first child of paragraphs) – can also use this with <a> tags too!

p:nth-child(n) = selects all paragraphs that are the nth-child (p:nth-child(3) selects all paragraphs that are the 3rd child)

Remember that “children” are not tag-specific – if there is a <h1> followed by 3 <p>’s, then the last <p> is the 4th child.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>