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

Detailed explanation of what is html anchor point

大家讲道理
大家讲道理Original
2016-11-07 17:40:401809browse

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…文字省略…文字省略


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  …文字省略


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

The code is as follows

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


Full code display:

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