Home > Web Front-end > HTML Tutorial > Several common methods for setting anchor positioning in html_HTML/Xhtml_Web page production

Several common methods for setting anchor positioning in html_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:37:41
Original
2644 people have browsed it

I know several ways to set anchor positioning in HTML, and I would like to share them with you here:

1. Use id positioning:

Copy the code
The code is as follows:

Anchor 1


11111111111


11111111111

11111111111

11111111111

11111111111

11111111111

11111111111
& lt;/br>11111111111

11111111111

11111111111

11111111111

11111111111

1111111111 1

11111111111

11111111111





This positioning can target any tag to locate.

2. Use name positioning:


Copy the code The code is as follows:
Anchor 5





< ;/br>








< ;/br>



1111111

Use name attribute only It can be positioned for the a tag, but it cannot be positioned for other tags such as div.

3. Use js to position


Copy the code The code is as follows:


  • 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 Recommendations
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template