How to change link color when hovering over a link in HTML?

Submitted 2 years, 12 months ago
Ticket #426
Views 327
Language/Framework Html
Priority Low
Status Closed

Thanks in advance.

Submitted on Apr 30, 21
add a comment

1 Answer

Verified

Inside <style>...</style> tags or in the external .css file you will use this:
a:hover { color: #f00; } /* red text on mouse hover */

If you want to change the color only for specific links, use a class.

.red_text:hover { color: #f00; }  /* red text on mouse hover */

To apply the .css class, you will use this syntax:

<tag_name class="red_text">Your text here</tag_name>

Submitted 2 years, 11 months ago


Latest Blogs