Hover colour of hyperlink in HTML
29,521
a:hover {color: red;}
a { color: black; text-decoration: none;}
<h4 style="text-align: left;"><a href="hyperlink" target="_blank">The making of #bobthebrewbus</a></h4>
Author by
Tim Forssman
I am a postdoctoral fellow at the University of Pretoria and I am using GIS for my archaeological research. I received my PhD from the University of Oxford and before that all my training was at the University of the Witwatersrand
Updated on July 09, 2022Comments
-
Tim Forssman almost 2 years
I'd like to make it so that when the mouse hovers over my hyperlink it changes colour. As it stands it remains black and so it is hard to see that the text is a hyperlink.
Here is the HTML code:
<h4 style="text-align: left;"><a href="hyperlink" target="_blank"><span style="color: #000000;">The making of #bobthebrewbus</span></a></h4>
-
Tim Forssman about 7 yearsI'm working on a wordpress site and flipping to text to edit so it is only in HTML. Can I change to CSS or how to I translate this into HTML and add to the code?
-
ankitjain11 about 7 yearsYou need to write CSS in style tags, in the document. Pseudo classes (like :hover) never refer to an element, but to any element that satisfies the conditions of the stylesheet rule.