What Are HTML Anchors?

It is a kind of hyperlink in webpage production, also called named anchor. Named anchors, like a quick locator, are a type of hyperlink within a page and are used quite widely.

Anchor

1. In the Design view of the Document window, place
In the Design view of the Document window, select the text or image from which you want to create a link. In the Link text box of the properties panel, type a number sign (#) and an anchor name. E.g:
* To link to an anchor named "top" in the current document, type #top. Example: <a href="#top"> Click me to connect to TOP </a>
* To link to an anchor named "top" in another document in the same folder, type filename.html # top.
Define the following anchor points in the appropriate place in the HTML page:
<a id="top"> Here is the TOP section </a>
<a id="content"> Here is the CONTENT section </a>
<a id="foot"> Here is the FOOT part </a>
(You can use the id attribute instead of the name attribute. Named anchors also work. [1] )
There are two methods for accessing the anchor as above
One is the use of hyperlink tags <a> </a> to make anchor links, which are mainly used for anchor access within the page
<a href="#top"> Click me to link to TOP </a>
<a href="#content"> Click me to link to CONTENT </a>
<a href="#foot"> Click me to link to FOOT </a>
Another way is to add an anchor tag directly after the page address, which is mainly used for anchor point access between different pages
If the address of this page is http: // file path / index.html, to access the foot anchor, just visit the following link.
http: // file path / index.html # foot

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?