Home > Web Front-end > HTML Tutorial > Detailed explanation of what is html anchor point

Detailed explanation of what is html anchor point

大家讲道理
Release: 2016-11-07 17:40:40
Original
1819 people have browsed it

The first step in learning web knowledge is definitely HTML. What is the purpose of the anchor point of html?

To put it simply, for example, if you want to view a very long article accurately by segment, you can use anchor points.

Code:

跳到001…文字省略…文字省略
Copy after login


In fact, the anchor point only needs name. The id is added to make it more compatible.

href value must be consistent with name i d, and "#" must be added in front, as above The code is compatible in ie6/7 and ff, but not in ie8.

Because the value of our anchor point is empty, we just add a space so as not to affect the appearance.

The following code is compatible with ie8

跳到001…文字省略 & n b s p  …文字省略
Copy after login


Another question, I want to display a certain page (such as :321.html)?

The code is as follows

跳到001…文字省略 & n b s p …文字省略
Copy after login


Full code display:

锚点示例网页第一部分网页第二部分1返回顶部2返回顶部
Copy after login
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