I am looking to modify color
of two separate divs with just using pure CSS
. Currently, I have only been able to alter the color
of one div using a single href
attribute
. Is it achievable using solely CSS?
#link1:target{color:red;}
#link2:target{color:green;}
margin-top:20px;
<a href="#link1 ">Make links change color</a>
<!-- <a href="#link1 #link2">Make links change color</a> //this not working-->
<div id="link1">
link1
</div>
<div id="link1">
link2
</div>