3

From what I know using something like:

.class a {}

Is the same as using:

.class a:link {}

Right?

Additionally..... are the following two styles the same?

.class a:focus {}
.class a:hover {}

Lastly..... the following styling is the color it is when the mouse is down right?

.class a:active {}
GEOCHET
  • 21,119
  • 15
  • 74
  • 98
Brett
  • 19,449
  • 54
  • 157
  • 290

2 Answers2

7
  • a is every anchor element.
  • a:link is only when the hyperlink has never been visited.
  • a:focus is when you're tabbing through the page with a keyboard.
  • a:hover is when your mouse is over the link.
  • a:active is when you mousedown the link.
  • a:visited is when you've already visited that link.
Michael Irigoyen
  • 22,513
  • 17
  • 89
  • 131
2
  • :link = Only links you haven't already visited
  • :visited = Links you have already visited
  • :focus = For elements in focus, like when you use the tabulator
  • :hover = When you move your mouse over it
  • :active = for just clicked links
Black-Pixel
  • 201
  • 1
  • 4
  • 10