I read a comment the other day over on CSS Drive from someone named Slackerbabe that I thought was worth repeating.
Heres a cool way to remember the order of the four selectors, “LVHA (link visited hover active)”,….
Just think ‘LOVE’ (LV) and ‘HATE’ (HA)….
The selectors she is referencing is for anchor elements:
- a:link
- a:visited
- a:hover
- a:active
Thank you so much. Now I get it right. I always forget the ACTIVE selector. :)
Nice blog, by the way!
Oh! Very good! I remenber this!
And if you want to add a a:focus to this (which is the same as “a:hover” except it targets non-pointer-tool devices like TABs, assistive technologies for the handicapped that cannot use a “mouse”, etc),
a:link {….}
a:visited {….}
a:focus, a:hover {…}
a:active {….}
if you are a STAR WARS fan, just think:
“lord vader’s former handle anakin”
and you have just added some Accessibility s. 508 to your pages.
I was not the one to think this up, -btw. I merely repeat it here to share.
:)
Or, use “LoVe For HAte”
aka pseudo-classes.