This article will explain you in detail about how to use html web pages anchor, Xiao Bian feel very practical, so the share to be a reference, I hope you can gain something after reading this article.
anchor is a web production hyperlinks, also known as named anchor. Named anchor like a rapid locator as a hyperlink within a page, use quite common.
English name: anchor
can be set using a named anchor tag in the document, these markers are usually placed at a specific topic or at the top of the document. You can then create these named anchor links, which can be quickly takes the visitor to the specified location.
to create a link to a named anchor of the two-step process. First, create a named anchor, and then to create the named anchor links.
as defined below in place of the anchor in an HTML page:
(You can use the id attribute instead of the name attribute, named anchor equally effective. )
there are two methods for accessing the anchor described above
a tag is the use of hyperlinks production anchor link is mainly used in the anchor access page
another way is applied directly behind the anchor tag page address, mainly for the anchor between different access pages
If the present page is the address http: // file path /index.html, access to the anchor foot just visit the following links point to
http: // file path /index.html#foot
2.html anchor in the end is why the?
throughThe custom says, for example, a long article, you want to see the segmentation, you can use anchor.
... Text omittedHREF’s value is consistent with Name \ ID, you must add “#”, above the above code. In IE6 / 7, it can be compatible in FF, but it will not work in IE8. Because we have anchor
... text omittedActually, the anchor can only be Name, plus ID is better to make it compatibility.
Jump to 001
… Text omitted
(anchor) tag and Name property, butThis is not the only way to create page anchors. The following briefly said two ways to make HTML page anchors. We can use W3School online test tools to test. Test code after opening the link is
This is when it is doing a background yesterday, I want to achieve "modification positioning", just pull the anchor mark (usually it is forgotten by me). But the program says that they have to take the value, "?" Or "&" must be "?" Or "&", so my anchor is not compatible ... Oh! There will be a solution! Although there is a problem with the anchor point in the JSP page, there is no problem in the static page, or it is worth learning!3. In web development, the page anchor is used. HTML page Anchors are used to link to a chapter of a page. In W3SChool, it is said that creating an anchor uses the
, there is no problem with the test. “
” Change to “
Chapter 4 ” is tested, the effect is the same. Instructions, the production page Annimpress can use the ID attribute in addition to the anchor tag NAME attribute. The value of the HREF attribute in the anchor
page anchor method 2
With regard to how to use an anchor in the HTML page, you can share it here, I hope that the above can help you have some help, you can learn more. If the article is good, you can share it out to let more people see.