The HTML code text is very useful for creating links to specific sections of a page (e.g., page.html#some_bookma
Have a look at the HTML5 spec.
At Obsolete features you’ll find:
Authors should not specify the
nameattribute onaelements.
When clicking on name, you’ll find:
[The following attributes are obsolete (though the elements are still part of the language), and must not be used by authors:]
nameonaelements (except as noted in the previous section)nameonembedelementsnameonimgelementsnameonoptionelements→ Use the
idattribute instead.
Click on id. You’ll see that id is a global attribute, this means that it can be used on any element.
The
idattribute specifies its element's unique identifier (ID).
[…]
Note: An element's unique identifier can be used for a variety of purposes, most notably as a way to link to specific parts of a document using fragment identifiers, as a way to target an element when scripting, and as a way to style a specific element from CSS.