Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I link to a location in the middle of an HTML document?

DOCUMENT html link location middle
0
10 Posted

How do I link to a location in the middle of an HTML document?

0

First, label the destination of the link. The old way to label the destination of the link was with an anchor using the NAME attribute. For example:

Section 2: Beyond Introductions

The modern way to label the destination of the link is with an ID attribute. For example:

Section 2: Beyond Introductions

Second, link to the labeled destination. The URL is the URL of the document, with “#” and the value of the NAME or ID attribute appended. Continuing the above examples, elsewhere in the same document you could use: go to Section 2 Similarly, in another document you could use:

-->

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.