Why doesn't the link id? I need that when I clicked on the link href = "# 2" it worked focus on the link with id = 2. (I need to make an anchor)
If you remove the id, then the focus works, because it connects through the class. What is the reason?
<span class="notsun" tabindex="0">Так работает если нажать сюда</span><br> <a class="notsun" href="#2">Так не работает если нажать сюда url</a> <br> <p class="to-be-changed">Здесь просто текст</p> <a class="to-be-changed" id="2" href="#">А это ссылка с id 2 </a> .notsun:focus~ .to-be-changed { background: #000; color: red; } 

