I study HTML, I understand with anchor links. I am trying to create my own link, but for some reason it does not work.

Here is the code:

<body> <p id="#a1;">////////////////////////////</p> <a id="#yakor">Это якорь </a> <pre> georgiang gg georgiang georgiang georgiang georgiang georgiang georgiang georgiang georgiang g </pre> <a href="#yakor">Begin</a> </body> 

Where was wrong?

Closed due to the fact that offsite participants Kromster , Cyrus , PashaPash , Abyx , Regent 8 Sep '15 at 12:10 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - PashaPash, Abyx, Regent
If the question can be reformulated according to the rules set out in the certificate , edit it .

2 answers 2

You have something with the code. Can not see the beginning. Example here: http://htmlbook.ru/samhtml/yakorya

 <a name="some"></a> ... <a href="#some></a> 

The address in the string should change. If this happens, the link works.

  • 2
    That's right, comrade registered anchor an id , instead of name , - Dmitry

For id or name should not be #

 <p id="anchor"></p> ... <a href="#anchor"></a>