Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS differing link styling

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 {}
like image 654
Brett Avatar asked Dec 02 '25 08:12

Brett


1 Answers

  • 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.
like image 177
Michael Irigoyen Avatar answered Dec 03 '25 23:12

Michael Irigoyen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!