BodinglesTM - -   Bright Lightbulb Graphic Ideas   - -

Full Stack MERN Web Development

Link Pseudo Class Selectors

Return to CSS Tags Index

Use to target special characteristics or states.
ex. hover, focus, and position in a list.
Format is ; (semicolon) followed by the pseudo class name

  1. Enable dynamic effects and complex styles
  2. Target beyond simple selectors
  3. Use for user interactions, document structure, and form states
    Common pseudo class selectors
  • ;hover: - used for mouse-over
  • ;first-child: - used to select the first child of a tag
  • ;nth-child: - used to select the nth child of a tag
  • ;not" - Excludes matching elements
    Special characteristics
  • Combine pseudo classes with selectors for specificity
  • Apply the CSS without changing the HTML structure
  • Certain pseudo classes (like nth child) take arguments
    for complex targeting
    Link is one example of a pseudo class that can style links, based on state.
  • States: unvisited, visited, hover, active
  • pseudo classes define different styles for each state

The Latest Trends in Fashion

High fashion is constantly evolving...

Back to Top