JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
<title>Insert title here</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="witha"><a href="">Test color without tag A</a><br/>This is not a link, it works fine(change to red when the div.witha is hovered).But the link above should change to red also.</div>
<div class="withouta">Test color with tag A</div>
</body>
</html>
CSS
.witha,.withouta {
height: 40px;
border: solid 1px black;
padding: 5px;
}
.witha:hover,.withouta:hover {
color: red ! important;
}
a:link {
color: black;
}
a:visited {
}
.witha:hover a {
color: red;
}
a:active {
}