Home > Web Front-end > HTML Tutorial > Anchor setting for jump within the page

Anchor setting for jump within the page

零下一度
Release: 2017-07-17 16:02:34
Original
1791 people have browsed it

The simplest method is to use the tag for the anchor point and write the ID of the DIV in the href attribute.

1. Anchor setting for jump within the page

Jump within the page requires two steps:

Method 1:

①: Set an Anchor link Go to find cats; (Note: Add # at the beginning of the attribute value of the href attribute)

②: Required on the page Set the anchor point; (Note: A name attribute must be written in the a tag, and the attribute value must be the same as the href attribute value in ①, without adding #) Fill in the necessary text as needed in the tag, generally do not write the content

Method 2:

①: Same as method 1 ①

②: Set the position of the anchor point < h3 id="miao">Meow Star Base; Add an id attribute to the label of the location you want to jump to. The attribute value is the same as the href attribute value in ①, without adding

# Method 2 does not need to add a separate a tag to specifically set the anchor point, just add an id to the tag at the required position.

Small case:

2. Cross-page jump①: Set the anchor link, append: #+anchor name after the path in href, you can
##




Cute Pet Collection Number



                                                                                                                   ;/li>
                                                                                                                                     meng">Other cute things



Meow Star Base

< p>meow meow~

meow meow~


meow meow~


Meow meow meow~


meow meow meow~


meow meow meow~




                                                                   < Woof woof ~


Woof woof ~


Woof woof~


p>


Mengmengmeng~


Mengmengmeng~


Meng Meng Meng~


Meng Meng Meng~


/p>

Mengmengmeng~








                                                                         . a href="Cute Pet Collection Number.html#miao">Jump to Cute Pet Collection Page

②: Set the anchor point in the page you want to jump to. See the method One step ②, choose one of the two methods.

The above is the detailed content of Anchor setting for jump within the page. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template