That’s not what :active
means. The :active
state is just when you are actually clicking on the element (say, when you are holding down your mouse).
To have a link highlighted on a specific page, you can use classes. Here are some ways you can do that: How to adjust color of Active Page in CSS?