How to open link in a specific part of a new tab

Asked

Viewed 79 times

-3

I want when the person clicks on a link to open a new tab in a specific part of the new tab.

  • 2

    Dude, if you have a new question, open another question. What was your intention to edit the content of a question that was already answered and closed and on top of that was about something else?

1 answer

1


To open the page in a new tab, add the property target=_blank. If you want it to open in a specific part, put the id corresponding to this element in the link, like this:

<a href="novapagina.html#footer" target="_blank">Abrir nova página</a>

In this example, the new page opens immediately in the element with the id footer.

  • Thanks, it wasn’t working because I was putting a / in href ("novapagina.html/#footer")

Browser other questions tagged

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