← Back to context

Comment by tambourine_man

2 years ago

Thanks, I remember it was replaced by the ID attribute, but in this case, it is not being used as a named anchor. It seem more like an index.

The name attribute can be an arbitrary string, so a number is a valid name. Even if you dont link to the anchor yourself, adding a name will make it possible for others to link to it in the future.

I belive anchors were initially designed to be two-way, but it turned out to be more useful to link to headlines rather than links, so links and link targets were seperated.