How to get the URL or anchor on a One-page

Asked

Viewed 1,688 times

0

I am developing a One-page, and I would like, that each time the customer is in a session, he changes the address from www.teste.com.br to www.teste.com.br/testimonials or www.teste.com.br#testimonials, whatever.

I thought about using anchors, but I do not know if it is the indicated one, because this is interesting also for the indexing of the site.

1 answer

1


You can make the link like this:

<a href="#depoimentos">Depoimentos</a>

And you mark the position on the page like this:

<a id="depoimentos"></a>

So when someone clicks on the link Depoimentos the page scroll leads to the element <a id="depoimentos"></a>.

  • Anchor as well as I imagined. And Google indexes this, will be?

  • Yes, anchor is a normal link, which also tells a specific position of the destination page. In this case the destination page is the same page where the link is.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.