I want the underscore to appear only when the link is active, but I cannot implement it ... It does not work. Is it possible to implement this at all? enter image description here

Tried like this:

#hrrr:target{ display: block; width: 100%; border: none; background-color: #ffaa00; height: 3px; margin-top: 1px; margin-left: 50px;} 

    1 answer 1

    A list of current pseudo-classes can be found at https://www.w3.org/wiki/CSS/Selectors#Pseudo-classes

    for the active link, I think it's better to use the class: active: target applies styles to the object your link is addressing

    https://www.w3.org/TR/selectors-3/#target-pseudo

    http://htmlbook.ru/css/target