Anchor tags do not work

Anchor tags on every page of my Wordpress website do not work. I understand how to do this, for example, on my contact page, I have

<a href="#end"></a> 

around the mail image. It is associated with “thank you” at the end of the page:

<a id="end"></a>

When clicking on the image of the mail, the link does not follow. If I type a direct link to the jump, it works. Thanks for any help!

+4
source share
1 answer

Your page source has the following:

<a id="end"></a>

It should be:

<a name="end"></a>

It is worth noting that the nametag attribute has been <a>deprecated since HTML5. Therefore, to be compatible with HTML5, I would suggest the following:

<h2 id="end">some text at the end</h2>

, , . .

+5

Source: https://habr.com/ru/post/1606187/


All Articles