Home >Web Front-end >HTML Tutorial >Example sharing of anchor tag usage in html_HTML/Xhtml_Web page production

Example sharing of anchor tag usage in html_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:40:571527browse
Anchor tag usage:
Linking to a specific location in the same document is called an anchor link. The method of using the
anchor is to select a target anchor point to create an anchor mark, and use the value of the name attribute of the tag to determine the

anchor mark name. The format is:

The attribute name is used to create a named anchor. When using a named anchor, we can create a link that jumps directly to a specific

part of the page without having the reader drag through the scroll bar to find the part he/she needs.
The following is the syntax for creating a named anchor:
Text to be displayed
The attribute name is used to create a named anchor. The anchor can be named with any text you like.
The following line defines a named anchor:
Useful Tips Section

Then create a reference to this target tag anywhere on the page For links, the name of the link address created on the title must be the same as the positioning tag name, and a "#" sign must be added in front. The format is:

A named anchor is no different from an ordinary link when displayed.
To link directly to the "gist" section, you generally need to add the symbol # and the anchor name at the end of the requested URL, like this:
Jump to the Useful Tips Section

The syntax of available anchor links inside the file "html_links.asp" (inside a page) is as follows:
Jump to the Useful Tips Section

It’s too tiring to read the text description: Here is a simple example for everyone in Script Home Song:




Tip: You can modify part of the code first and then run
and copy it to your page to see if it works!
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn