Pseudo Classes of Hyperlinks

Pseudo Classes of Hyperlinks (provided by Doris Yee)

CSS hyperlink styles provide the functionality to change the behavior and look of the HTML hyperlinks at run time of HTML documents. You can define different text colors for different HTML hyperlinks states. This feature of CSS style sheets for HTML hyperlink anchor tag shows the dynamic behavior of links for different states such as: unvisited (link), visited, active and specially for hover (mouse over state).

  • :link
  • :visited
  • :hover
  • :active

There’s a fifth state, :focus, primarily used by folks using the keyboard to navigate through the page. Though it isn’t as commonly used, or styled, as the other four, it should be included along with the others. It also isn’t fully supported, with Opera ignoring it entirely and Internet Explorer (at least through 7) ignoring the styling but surrounding a focused link with a dotted border.




© 2011. All Rights Reserved

TopTop