Should I make HTML Anchors with 'name' or 'id'?

前端 未结 14 1248
旧巷少年郎
旧巷少年郎 2020-11-22 00:49

When one wants to refer to some part of a webpage with the \"http://example.com/#foo\" method, should one use

F

14条回答
  •  青春惊慌失措
    2020-11-22 01:35

    How about using name attribute for old browsers and id attribute to the new browsers. Both options will be used and fallback method will be implemented by default!!!

提交回复
热议问题