Home  >  Article  >  Web Front-end  >  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
WBOYOriginal
2016-05-16 16:37:412590browse

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:


  • Previous article:Introduction to the difference between OBJECT and EMBED tags used when displaying flash content_HTML/Xhtml_Web page productionNext article:Introduction to the difference between OBJECT and EMBED tags used when displaying flash content_HTML/Xhtml_Web page production

    Related articles

    See more