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

Submitted 4 months, 3 weeks ago
Ticket #426
Views 74
Language 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 4 months, 3 weeks ago


Wanna Post Ad?
Reach a large group of audience by posting an ad about your business here. For more details
Drop us a Message