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 read 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.
The value of href must be the same as name \ i d Consistent, "#" must be added in front. The above code is compatible in ie6/7 and ff, but not in ie8.
Because thevalue of our anchor point is empty, we can just add a space so as not to affect the appearance.
The following code can be compatible with ie8
Another question, do you want to display an anchor content of a certain page (such as: 321.html)?
The code is as follows
All code display:
The above is the detailed content of Detailed explanation of what html anchors are. For more information, please follow other related articles on the PHP Chinese website!