How can I make a link in HTML to change color when I hover over the mouse and remove the underline using CSS?

How can I make a link in HTML by rotating the color while hovering and removing the underline using CSS?

+3
source share
2 answers

You want to see : hover pseudoselector , color properties, and text-decoration property .

a:hover { color: red; text-decoration: none; }

For your hyperlink to be written the way you want (and not against other style rules), use !important:

a:hover { color: red !important; text-decoration: none !important; }
+18
source

, , LoVe HAte. : , : , : hover : active. .

a:link{
 /*this only apllies to named anchors*/
}
a:visited{
 /*possible styles for visited links*/
}
a:hover{
 /*when mouse hovers over a-tag*/
 text-decoration:none;
 color:red;
}
a:active{
 /*possible styles on active (when a-tag is clicked)*/
}
+7

Source: https://habr.com/ru/post/1702974/


All Articles