How do you link (with <a>) so that the browser goes to certain subheading on the target page as opposed to the top?
How do you link (with <a> ) so that the browser goes to certain
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If there is any tag with an
id(e.g.,<div id="foo">), then you can simply append#footo the URL. Otherwise, you can’t arbitrarily link to portions of a page.Here’s a complete example:
<a href="http://example.com/page.html#foo">Jump to #foo on page.html</a>Linking content on the same page example:
<a href="#foo">Jump to #foo on same page</a>It is called a URI fragment.