Go to the cat star; (Note: href"/> Go to the cat star; (Note: href">
Home > Article > Web Front-end > Anchor setting for jump within the page
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:
. a href="Cute Pet Collection Number.html#miao">Jump to Cute Pet Collection Page
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!