Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to make an Anchor tag to redirect to a particular section of another html page?

I want to know what i should put in the href="" section of the tag so that, when i click on it, it should take me to a particular section of another html page.

i only know that if i put the id of a section as href, then it should take me to a section of the same page. But what about other page

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

If you want to go to a specific section in the same page, create a hyperlink by using the id of the link target, preceded by #:

<a href="#section">Jump to the part of the page with the “section” id</a>

If you want to go a specific section in another page, the same way but after the page link:

Link to another page in the same domain:

<a href="/another-page.html#section">Go to the HTML Links in our website.</a>

Link to another page in different domain:

<a href="https://en.wikipedia.org/wiki/Main_Page#wikipedia">Go to the main page of Wikipedia</a>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading