Asked By
Alan Farrer
10 points
N/A
Posted on - 04/05/2012
I need to change the link color during moving mouse over the link in HTML. What to do for this purpose?
Changing link color on mouse movement over the link.
If you need to have a link that changes it's color whenever you hover you mouse over it here is a simple code you need to paste on "HEAD" section of your html code.
<style type="text/css">
<!–
A:link { COLOR:red ; TEXT-DECORATION: none; font-weight: normal }
A:hover { COLOR: pink; TEXT-DECORATION: none; font-weight: none }
–>
</style>
Â
Explanation on how it works:
Â
"A:link" – this part will set what color your links will show on the webpage your are going to create.
"A:hover" – and this part will set what color the link changes to whenever you hover or move your mouse on it.
Â
Some other useful codes:
Â
"A:active" – this will set the color of the links after being clicked "A:visited" – this will set the color of the link if it had already been clicked."text-decoration" – this would allow you if you want to add underline on a link. Type in "underline" if you want it or "none" if you don't.