standard selector

RULES:

EXAMPLE:

muliple selector

RULES:

EXAMPLE:

contextual selector

RULE ONE:

EXAMPLE ONE:

RULE TWO:

EXAMPLE TWO:

contextual Selector — child

RULES:

EXAMPLE:

"class" versus "id"

RULES:

EXAMPLES:

universal selector

STAR SELECTOR:

EXAMPLE:

GRANDCHILD SELECTOR:

EXAMPLE:

adjacent sibling

RULES:

EXAMPLE:

attribute selector

RULES:

EXAMPLE:

pseudo-classes

DEFINITION

FOUR ANCHOR LINK PSEUDO-CLASSES

  1. LINK: the state of link before it has been clicked on
  2. VISITED: the state of the link that has been clicked on
  3. HOVER: the state of the link being pointed at
  4. ACTIVE: the state of the link currently being clicked on

EXAMPLE:

other pseudo-classes

:FIRST-CHILD

example:

:FOCUS

example:

pseudo-elements

:FIRST-LETTER

example:

:FIRST-LINE

example:

:BEFORE & :AFTER

example:

 

Valid XHTML 1.0 Strict graphic: Valid CSS 2.1