I have for example this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS - Selector :target</title>
<style type="text/css">
#a:target {
color:blue;
}
.ta-center { text-align: center; }
.wrap { padding: 5% 12%; }
</style>
</head>
<body>
<div class="wrap">
<h1 class="ta-center">CSS - Selector :target</h1>
<a href="#a">Sets texts in color</a> |
<a href="#">Reset</a>
<!-- first text -->
<p id="a">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.</p>
<!-- second text -->
<p id="b">Numquam quas suscipit ipsam asperiores similique blanditiis est deleniti temporibus earum. Autem, nisi officiis atque! Libero ab error.</p>
</div>
<!-- third text -->
<p class="c">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
</body>
</html>
How I can change color to second text (p with id "b"), for example, to red color, using the link?
I want´t to use JS, only CSS properties, and prefer to know if I can to use "target" specifically for this or is imposible and need another way.
Ok, final result must be: when I click the link "Sets texts in color", first p will be blue, second p will be red. As extra, the third p will be green (I´m sorry, the extra part wasn´t originally in the question, but I think that is more interesting if i can handle no sibling elements).