You can use JavaScript to add a class active to you element. Here is an example with jQuery but you can do it with pure JavaScript.
var $link_menu = $('ul li a');
$link_menu.on('click', function() {
// When you click on a link on your menu, it removes all the active class
$link_menu.removeClass('active');
// Add an active class on the selected element
$(this).addClass('active');
});
.active {
color: red;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<ul>
<li> <a tabindex=0 href="#"> Home</a></li>
<li> <a tabindex=0 href="#"> About us</a></li>
<li> <a tabindex=0 href="#"> Contact us</a></li>
<li> <a tabindex=0 href="#">Products</a></li>
<li> <a tabindex=0 href="#"> Services</a></li>
</ul>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…