Answer the question
In order to leave comments, you need to log in
How to set up an anchor link on a page?
Hello
, I'm confused. Thinking about how to properly set up the anchor and link on the current page. Tell me please.
Consider an example on a conditional page: site.ru/this-page
How to write an anchor correctly:
Options:
<a href="#go">go</a>
<a href="this-page#go">go</a>
<a href="this-page/#go">go</a>
<a href="http://site.ru/this-page#go">go</a>
<a href="http://site.ru/this-page/#go">go</a>
<a name="go"></a>
<a id="go"></a>
Answer the question
In order to leave comments, you need to log in
An anchor is a bookmark with a unique name at a certain place on a web page, designed to create a link to it. Anchors are useful in large documents so that you can quickly jump to the desired section.
<a href="#go">go</a>
go to the anchor on the current page <a href="this-page#go">go</a>
go to this-page and the anchor is gone
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question