W
W
weranda2017-09-23 18:47:33
HTML
weranda, 2017-09-23 18:47:33

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>

How to correctly indicate where, what place on the page to link to?
Options:
<a name="go"></a>
<a id="go"></a>

Maybe there are other ways?
How correct is what the rules say and is there a difference for browsers and search engines?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
oh, 2017-09-23
well @AnneSmith

htmlbook.ru/samhtml

M
Maxim Timofeev, 2017-09-23
@webinar

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.

htmlbook.ru/samhtml/yakorya
so <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 question

Ask a Question

731 491 924 answers to any question