Home  >  Article  >  Web Front-end  >  How to position html

How to position html

藏色散人
藏色散人Original
2021-06-03 14:30:563945browse

HTML positioning method: First create an HTML sample file; then use the a tag to write three menus and content; then add the name attribute to the a tag of each content title and add "# link" ;Finally, add a specific page in front of "#" to automatically locate the specific location of this page.

How to position html

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

As shown in the picture, there are three menus at the top: "Character Profile", "Deeds Introduction", and "Other Instructions", and then the following is the specific content display of each menu. When we need to click on the above menu, the page will automatically Locate the corresponding content

How to position html

as shown in the picture, we first write three menus, use the a tag

How to position html

## and then Write the content of each menu below

How to position html

The key point is to add the name attribute to the a tag of each content title (add the name attribute to other tags, above The menu cannot be located)

How to position html

Then add links to each a tag in the menu above: starting with "#" and adding the corresponding name attribute

How to position html

Different pages can also be positioned. Just add the specific page in front of "#", and then the specific location of the page will be automatically positioned

How to position html

[Recommended learning:

html video tutorial]

The above is the detailed content of How to position html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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