<a>

时间:2018-01-13 21:58:38

标签: html html5

In the past, you would use <a name="example"> to create an anchor which you could jump to by adding #example to the url.

However, this is being removed in HTML 5, with the "official" alternative being to use id instead.

This is not acceptable when dealing with user-generated content, since it could interfere with other elements on the page. With name, the worst that will happen is the link won't work, but conflicting ids could break styles and scripts as well.

Is there some other way to do this?

0 个答案:

没有答案