I’m under the impression that changing an anchor tag on hover can be done like this:
a:hover {background: #FFDD00;}
a:hover {color: #AAAAAA;}
Correct me if I’m wrong.
Now, for some convoluted reason, I can’t put that code in a style sheet, I have to put it in the actual HTML. How would I do that?
<a href="..." style="___???___">...</a>
There’s no way to do that.
Inline CSS can’t touch pseudo-classes such as
:hover.I’m guessing the reason you want to do this is because you can only edit the
<body>of the HTML (for whatever reason). What you can do is add astyleelement:Having a
styleelement outside the<head>is not valid HTML, but (crucially) it does work in all browsers.