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

前端 未结 14 1222
旧巷少年郎
旧巷少年郎 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:29

    ID method will not work on older browsers, anchor name method will be deprecated in newer HTML versions... I'd go with id.

提交回复
热议问题